]> sigrok.org Git - pulseview.git/commitdiff
AnalogSignal: Recalculate scale when restoring div height
authorRamon Felder <redacted>
Sun, 18 Dec 2022 07:39:17 +0000 (08:39 +0100)
committerSoeren Apel <redacted>
Fri, 26 Jan 2024 22:45:20 +0000 (23:45 +0100)
When restoring analog signal settings from a *.pvs file changes the div height, the vertical scale must be recalculated.
Otherwise, the signal is scaled as if the div height had not changed, until a UI event triggers recalculation.

pv/views/trace/analogsignal.cpp

index d128e1c37ba354753277cac9956644136d01cd57..2a50d5716af2aaf9f88c9468b1e00f50f7b76b63 100644 (file)
@@ -177,6 +177,7 @@ void AnalogSignal::restore_settings(std::map<QString, QVariant> settings)
                div_height_ = settings["div_height"].toInt();
 
                update_logic_level_offsets();
+               update_scale();
 
                if ((div_height_ != old_height) && owner_) {
                        // Call order is important, otherwise the lazy event handler won't work