13
0
Fork 0

no track movement up/down when a selected track is already at the relevant edge

This commit is contained in:
Paul Davis 2024-05-06 10:10:47 -06:00
parent f92d821a72
commit 576403c4cb
1 changed files with 14 additions and 0 deletions

View File

@ -2398,6 +2398,20 @@ Editor::move_selected_tracks (bool up)
sl.sort (Stripable::Sorter());
/* Check if the selected tracks are already at the beginning or end of
* the ordering, depending on direction.
*/
for (auto & s : sl) {
if (s->is_selected()) {
if (up && (s->presentation_info().order() <= 1)) {
return;
} else if (!up && (s->presentation_info().order() >= sl.size() - 1)) {
return;
}
}
}
std::list<ViewStripable> view_stripables;
/* build a list that includes time axis view information */