mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
Fix initial order-keys when creating tracks/busses
.. and leave some notes for the day when UI treemodel won't be canonical to set order-keys.
This commit is contained in:
parent
91cee14ca6
commit
d0e3eb42a6
1 changed files with 21 additions and 0 deletions
|
|
@ -3484,6 +3484,16 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* auditioner and monitor routes are not part of the order */
|
||||||
|
if (auditioner) {
|
||||||
|
assert (n_routes > 0);
|
||||||
|
--n_routes;
|
||||||
|
}
|
||||||
|
if (_monitor_out) {
|
||||||
|
assert (n_routes > 0);
|
||||||
|
--n_routes;
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::OrderKeys, string_compose ("ensure order gap starting at %1 for %2\n", order, new_routes.size()));
|
DEBUG_TRACE (DEBUG::OrderKeys, string_compose ("ensure order gap starting at %1 for %2\n", order, new_routes.size()));
|
||||||
ensure_route_presentation_info_gap (order, new_routes.size());
|
ensure_route_presentation_info_gap (order, new_routes.size());
|
||||||
|
|
||||||
|
|
@ -3532,6 +3542,17 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
|
||||||
/* presentation info order may already have been set from XML */
|
/* presentation info order may already have been set from XML */
|
||||||
|
|
||||||
if (!r->presentation_info().order_set()) {
|
if (!r->presentation_info().order_set()) {
|
||||||
|
/* this is only useful for headless sessions,
|
||||||
|
* Editor::add_routes() and Mixer_UI::add_routes() will
|
||||||
|
* override it following the RouteAdded signal.
|
||||||
|
*
|
||||||
|
* Also routes should be sorted before VCAs (like the GUI does).
|
||||||
|
* Session::ensure_route_presentation_info_gap() does not special case VCAs either.
|
||||||
|
*
|
||||||
|
* ... but not to worry, the GUI's
|
||||||
|
* gtk2_ardour/route_sorter.h and various ::sync_presentation_info_from_treeview()
|
||||||
|
* handle this :)
|
||||||
|
*/
|
||||||
|
|
||||||
if (order == PresentationInfo::max_order) {
|
if (order == PresentationInfo::max_order) {
|
||||||
/* just add to the end */
|
/* just add to the end */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue