From: Ramon Felder Date: Sun, 18 Dec 2022 07:39:17 +0000 (+0100) Subject: AnalogSignal: Recalculate scale when restoring div height X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9b8b7342725491d626609017292fa9259f7d5e0e;p=pulseview.git AnalogSignal: Recalculate scale when restoring div height 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. --- diff --git a/pv/views/trace/analogsignal.cpp b/pv/views/trace/analogsignal.cpp index d128e1c3..2a50d571 100644 --- a/pv/views/trace/analogsignal.cpp +++ b/pv/views/trace/analogsignal.cpp @@ -177,6 +177,7 @@ void AnalogSignal::restore_settings(std::map 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