projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
765e7d3
)
Fix wrong ruler scale after loading a file
author
Soeren Apel
<soeren@apelpie.net>
Mon, 24 Aug 2015 19:23:32 +0000
(21:23 +0200)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Tue, 25 Aug 2015 16:11:16 +0000
(18:11 +0200)
pv/view/view.cpp
patch
|
blob
|
history
diff --git
a/pv/view/view.cpp
b/pv/view/view.cpp
index fdb9354b9315cefe4c4a06d23b00a879db7bab82..d32a23da07e3bb30c8553f494636bdda959c6c06 100644
(file)
--- a/
pv/view/view.cpp
+++ b/
pv/view/view.cpp
@@
-925,14
+925,20
@@
void View::signals_changed()
void View::capture_state_updated(int state)
{
void View::capture_state_updated(int state)
{
- // Reset "always zoom to fit" when we change to the stopped state
- if (always_zoom_to_fit_ && (state == Session::Stopped)) {
- always_zoom_to_fit_ = false;
- always_zoom_to_fit_changed(false);
- }
-
if (state == Session::Running)
time_unit_ = util::Samples;
if (state == Session::Running)
time_unit_ = util::Samples;
+
+ if (state == Session::Stopped) {
+ // After acquisition has stopped we need to re-calculate the ticks once
+ // as it's otherwise done when the user pans or zooms, which is too late
+ calculate_tick_spacing();
+
+ // 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);
+ }
+ }
}
void View::data_updated()
}
void View::data_updated()