Fix timeline marker click-drag arbitrary deselection

The logic to cycle selected markers wasn't cycling back to the beginning
of the list.

The marker after the selected marker at the cursor frame was also used
to check if a selection existed, causing dragging to transform all
selected markers to de-select all when when dragging the last marker.
This commit is contained in:
Campbell Barton 2022-03-03 15:20:27 +11:00
parent ef431a8705
commit 61c288cee5
1 changed files with 1 additions and 1 deletions

View File

@ -1146,7 +1146,7 @@ static int select_timeline_marker_frame(ListBase *markers,
for (marker = markers->first; marker; marker = marker->next) {
if (marker->frame == frame) {
if (marker->flag & SELECT) {
marker_selected = marker->next;
marker_selected = marker->next ? marker->next : markers->first;
break;
}
}