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.
This commit is contained in:
Paul Davis 2020-03-25 18:35:28 -06:00
parent 84f8b8beae
commit 25c0bd9274
1 changed files with 6 additions and 2 deletions

View File

@ -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;