mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Fix iterator off-by-one: Allow to move top-most track. via ctrl up/down
This commit is contained in:
parent
3a50975c3d
commit
4ece934e66
1 changed files with 4 additions and 5 deletions
|
|
@ -1663,9 +1663,9 @@ EditorRoutes::move_selected_tracks (bool up)
|
||||||
PresentationInfo::ChangeSuspender cs;
|
PresentationInfo::ChangeSuspender cs;
|
||||||
|
|
||||||
if (up) {
|
if (up) {
|
||||||
unselected_neighbour = view_stripables.end ();
|
unselected_neighbour = view_stripables.begin ();
|
||||||
|
++unselected_neighbour;
|
||||||
vsi = view_stripables.begin();
|
vsi = view_stripables.begin();
|
||||||
++vsi;
|
|
||||||
|
|
||||||
while (vsi != view_stripables.end()) {
|
while (vsi != view_stripables.end()) {
|
||||||
|
|
||||||
|
|
@ -1699,10 +1699,11 @@ EditorRoutes::move_selected_tracks (bool up)
|
||||||
|
|
||||||
unselected_neighbour = view_stripables.end();
|
unselected_neighbour = view_stripables.end();
|
||||||
vsi = unselected_neighbour;
|
vsi = unselected_neighbour;
|
||||||
--vsi;
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
||||||
|
--vsi;
|
||||||
|
|
||||||
if (vsi->stripable->presentation_info().selected()) {
|
if (vsi->stripable->presentation_info().selected()) {
|
||||||
|
|
||||||
if (unselected_neighbour != view_stripables.end()) {
|
if (unselected_neighbour != view_stripables.end()) {
|
||||||
|
|
@ -1726,8 +1727,6 @@ EditorRoutes::move_selected_tracks (bool up)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--vsi;
|
|
||||||
|
|
||||||
} while (vsi != view_stripables.begin());
|
} while (vsi != view_stripables.begin());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue