mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-22 13:17:17 +01:00
[Summary] Bug fix #Tracks order is incorrect when first add tracks by doubleclick and then use "addtrack" menu
[Feature reviewed] AMishyn [Reviewed] GZharun
This commit is contained in:
parent
c8ab91df54
commit
d69a0b6e42
1 changed files with 17 additions and 6 deletions
|
|
@ -3571,13 +3571,24 @@ ARDOUR_UI::setup_order_hint ()
|
|||
order_hint = tav->route()->order_key();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* If no tracks are selected or only master bus is selected do not create a gap in the existing route order keys.*/
|
||||
if (editor->get_selection().tracks.empty ()) {
|
||||
_session->set_order_hint (order_hint);
|
||||
return;
|
||||
} else if (editor->get_selection().tracks.size () == 1) {
|
||||
TimeAxisView* selected_tav = editor->get_selection().tracks.front();
|
||||
RouteTimeAxisView* tav = dynamic_cast<RouteTimeAxisView*> (selected_tav);
|
||||
if (tav && tav->route() && tav->route()->is_master () ) {
|
||||
_session->set_order_hint (order_hint);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!editor->get_selection().tracks.empty()) {
|
||||
order_hint++;
|
||||
}
|
||||
|
||||
_session->set_order_hint (order_hint);
|
||||
|
||||
order_hint++;
|
||||
_session->set_order_hint (order_hint);
|
||||
|
||||
/* create a gap in the existing route order keys to accomodate new routes.*/
|
||||
|
||||
boost::shared_ptr <RouteList> rd = _session->get_routes();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue