Skip to content

Commit

Permalink
AnalogSignal: Recalculate scale when restoring div height
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ramonfelder authored and abraxa committed Jan 26, 2024
1 parent 82c6d8f commit 9b8b734
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pv/views/trace/analogsignal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b8b734

Please sign in to comment.