13
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 7b1388f263
commit 3ec506b4a4

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 */