From 90472a514889734ae79d156f2c30a2c9ca1fd611 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Sun, 5 Mar 2017 20:30:34 +0100 Subject: [PATCH 1/1] Tie the "always zoom to fit" setting in with the settings mgmt --- pv/view/view.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pv/view/view.cpp b/pv/view/view.cpp index f6048f04..d460e868 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -1232,6 +1232,14 @@ void View::capture_state_updated(int state) set_time_unit(util::TimeUnit::Samples); trigger_markers_.clear(); + + // Activate "always zoom to fit" if the setting is enabled + GlobalSettings settings; + bool state = settings.value(GlobalSettings::Key_View_AlwaysZoomToFit).toBool(); + if (state) { + always_zoom_to_fit_ = true; + always_zoom_to_fit_changed(always_zoom_to_fit_); + } } if (state == Session::Stopped) { @@ -1242,7 +1250,7 @@ void View::capture_state_updated(int state) // Reset "always zoom to fit", the acquisition has stopped if (always_zoom_to_fit_) { always_zoom_to_fit_ = false; - always_zoom_to_fit_changed(false); + always_zoom_to_fit_changed(always_zoom_to_fit_); } } } -- 2.30.2