projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
24c29d4
)
Tie the "always zoom to fit" setting in with the settings mgmt
author
Soeren Apel
<soeren@apelpie.net>
Sun, 5 Mar 2017 19:30:34 +0000
(20:30 +0100)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Tue, 7 Mar 2017 21:59:36 +0000
(22:59 +0100)
pv/view/view.cpp
patch
|
blob
|
history
diff --git
a/pv/view/view.cpp
b/pv/view/view.cpp
index f6048f0401c3c8a16826307528f2861b2fbb31db..d460e8686c3e22decc8f0b9d11e3f0ab32d59bd9 100644
(file)
--- 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();
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) {
}
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;
// 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_
);
}
}
}
}
}
}