13
0

prevent flickering of snapped cursor during drags when it should be invisible

This commit is contained in:
Paul Davis 2024-04-12 18:54:52 -06:00
parent e7b3b61dbc
commit 1eb2a345df

View File

@ -2821,9 +2821,11 @@ Editor::set_snapped_cursor_position (timepos_t const & pos)
{
if (_edit_point == EditAtMouse) {
_snapped_cursor->set_position (pos.samples());
if (UIConfiguration::instance().get_show_snapped_cursor()) {
_snapped_cursor->show ();
}
}
}
/** Snap a position to the grid, if appropriate, taking into account current
@ -6514,13 +6516,17 @@ Editor::super_rapid_screen_update ()
timepos_t ms (selection->markers.front()->position());
snap_to (ms); // should use snap_to_with_modifier?
_snapped_cursor->set_position (ms.samples());
if (UIConfiguration::instance().get_show_snapped_cursor()) {
_snapped_cursor->show ();
}
}
} else if (_edit_point == EditAtMouse && mouse_sample (where.sample, ignored)) {
/* cursor is in the editing canvas. show it. */
if (!_drags->active()) {
if (UIConfiguration::instance().get_show_snapped_cursor()) {
_snapped_cursor->show ();
}
}
} else {
/* mouse is out of the editing canvas, or edit-point isn't mouse. Hide the snapped_cursor */
_snapped_cursor->hide ();