summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-03-25 18:35:28 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2020-03-25 18:39:59 -0600
commit25c0bd9274c541426eb3232b7b697aa3b69f2960 (patch)
treed8f382a5db67fa0c99bd3cc5abc2befd8c76135e
parent84f8b8beae752bed053b555579b04397d1785cee (diff)
Prevent updates to the playhead when a locate is pending after a drag/click is used to move the playhead.
There are two problem cases: 1) the drag "fake-located" the playhead, but a redraw happens before the locate itself finishes. 2) the transport emits Session::PositionChanged from Session::non_realtime_stop(), even though this is occuring in the "middle" of the locate process (we stop first). In the first case, the drag code sets _pending_locate_request, since we need this to be true even before the queued SessionEvent for the locate has been processed. So to deal with this case In the second case, we use Session::locate_initiated() to decide if we're in the middle of a locate.
-rw-r--r--gtk2_ardour/editor.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 12c6ebf413..f455fa992d 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1256,7 +1256,9 @@ Editor::map_position_change (samplepos_t sample)
center_screen (sample);
}
- playhead_cursor->set_position (sample);
+ if (!_session->locate_initiated()) {
+ playhead_cursor->set_position (sample);
+ }
}
void
@@ -5951,7 +5953,9 @@ Editor::super_rapid_screen_update ()
return;
}
- playhead_cursor->set_position (sample);
+ if (!_pending_locate_request) {
+ playhead_cursor->set_position (sample);
+ }
if (_session->requested_return_sample() >= 0) {
_last_update_time = 0;