mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-03-10 15:23:50 +01:00
fix plot drawing in case of autoscale and no trace data
This commit is contained in:
parent
8972af3f53
commit
72f2a72445
|
|
@ -740,10 +740,14 @@ void TraceXYPlot::updateAxisTicks()
|
|||
min -= range * 0.05;
|
||||
max += range * 0.05;
|
||||
}
|
||||
YAxis[i].rangeMin = min;
|
||||
YAxis[i].rangeMax = max;
|
||||
YAxis[i].rangeDiv = createAutomaticTicks(YAxis[i].ticks, min, max, 8);
|
||||
} else {
|
||||
// max/min still at default values, no valid samples are available for this axis, use default range
|
||||
max = 1.0;
|
||||
min = -1.0;
|
||||
}
|
||||
YAxis[i].rangeMin = min;
|
||||
YAxis[i].rangeMax = max;
|
||||
YAxis[i].rangeDiv = createAutomaticTicks(YAxis[i].ticks, min, max, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue