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.
This commit is contained in:
Ramon Felder 2022-12-18 08:39:17 +01:00 committed by Soeren Apel
parent 82c6d8f06a
commit 9b8b734272
1 changed files with 1 additions and 0 deletions

View 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