mirror of
https://github.com/gwm17/implot.git
synced 2024-11-23 02:38:53 -05:00
fix linked axis and auto fitting issue #205
This commit is contained in:
parent
1d674e7557
commit
27bc59eb43
|
@ -1414,10 +1414,10 @@ bool BeginPlot(const char* title, const char* x_label, const char* y1_label, con
|
|||
// Initialization ------------------------------------------------------------
|
||||
|
||||
if (!plot.Initialized) {
|
||||
if (!ImHasFlag(plot.XAxis.Flags,ImPlotAxisFlags_NoInitialFit) && !gp.NextPlotData.HasXRange)
|
||||
if (!ImHasFlag(plot.XAxis.Flags,ImPlotAxisFlags_NoInitialFit) && !gp.NextPlotData.HasXRange && !gp.NextPlotData.LinkedXmin && !gp.NextPlotData.LinkedXmax)
|
||||
gp.FitThisFrame = gp.FitX = true;
|
||||
for (int i = 0; i < IMPLOT_Y_AXES; ++i) {
|
||||
if (!ImHasFlag(plot.YAxis[i].Flags,ImPlotAxisFlags_NoInitialFit) && !gp.NextPlotData.HasYRange[i])
|
||||
if (!ImHasFlag(plot.YAxis[i].Flags,ImPlotAxisFlags_NoInitialFit) && !gp.NextPlotData.HasYRange[i] && !gp.NextPlotData.LinkedYmin[i] && !gp.NextPlotData.LinkedYmax[i])
|
||||
gp.FitThisFrame = gp.FitY[i] = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user