]> sigrok.org Git - pulseview.git/commitdiff
View: Update ruler after restoring session
authorSoeren Apel <redacted>
Sat, 5 Aug 2017 20:38:45 +0000 (22:38 +0200)
committerSoeren Apel <redacted>
Sat, 5 Aug 2017 20:38:45 +0000 (22:38 +0200)
If we don't do this, the ruler is out-of-sync with the rest
of the view until the session is loaded and goes into stopped
state. At that point, the ruler is updated, which is too late.

pv/views/trace/view.cpp

index bda056acbdec6c4a3a6521d22075507651b1dfde..ce78100f83383da5df9393ef28222cf02e577795 100644 (file)
@@ -356,6 +356,9 @@ void View::restore_settings(QSettings &settings)
 
        settings_restored_ = true;
        suppress_zoom_to_fit_after_acq_ = true;
+
+       // Update the ruler so that it uses the new scale
+       calculate_tick_spacing();
 }
 
 vector< shared_ptr<TimeItem> > View::time_items() const