1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-26 20:28:50 -05:00

PlotDigital FitThisFrame issue

FitThisFrame is triggering wrong fit for analog signals. It' not necessary due to actual nature of digital plot.
This commit is contained in:
ozlb 2020-05-12 15:05:14 +02:00 committed by GitHub
parent 1e627d81ce
commit 99319d9fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2563,14 +2563,6 @@ inline void PlotDigitalEx(const char* label_id, Getter getter, int count, int of
if (gp.Style.Colors[ImPlotCol_Line].w != -1) if (gp.Style.Colors[ImPlotCol_Line].w != -1)
item->Color = gp.Style.Colors[ImPlotCol_Line]; item->Color = gp.Style.Colors[ImPlotCol_Line];
// find data extents
if (gp.FitThisFrame) {
for (int i = 0; i < count; ++i) {
ImVec2 p = getter(i);
FitPoint(p);
}
}
ImGui::PushClipRect(gp.BB_Grid.Min, gp.BB_Grid.Max, true); ImGui::PushClipRect(gp.BB_Grid.Min, gp.BB_Grid.Max, true);
bool cull = HasFlag(gp.CurrentPlot->Flags, ImPlotFlags_CullData); bool cull = HasFlag(gp.CurrentPlot->Flags, ImPlotFlags_CullData);