Fix Drifting Master hopefully for real this time.
This commit is contained in:
parent
8fb8e1bbde
commit
1457050d7a
@ -4053,8 +4053,7 @@ PresentationInfo::order_t
|
||||
ARDOUR_UI::translate_order (RouteDialogs::InsertAt place)
|
||||
{
|
||||
if (editor->get_selection().tracks.empty()) {
|
||||
// tracks empty actually means we have master, add 1
|
||||
return PresentationInfo::max_order + 1;
|
||||
return PresentationInfo::max_order;
|
||||
}
|
||||
|
||||
PresentationInfo::order_t order_hint = PresentationInfo::max_order;
|
||||
|
@ -1013,6 +1013,14 @@ EditorRoutes::sync_presentation_info_from_treeview ()
|
||||
TreeModel::Children::iterator ri;
|
||||
bool change = false;
|
||||
PresentationInfo::order_t order = 0;
|
||||
bool master_is_first = false;
|
||||
uint32_t count = 0;
|
||||
|
||||
// special case master if it's got PI order 0 lets keep it there
|
||||
if (_session->master_out() && (_session->master_out()->presentation_info().order() == 0)) {
|
||||
order++;
|
||||
master_is_first = true;
|
||||
}
|
||||
|
||||
for (ri = rows.begin(); ri != rows.end(); ++ri) {
|
||||
|
||||
@ -1029,12 +1037,26 @@ EditorRoutes::sync_presentation_info_from_treeview ()
|
||||
|
||||
stripable->presentation_info().set_hidden (!visible);
|
||||
|
||||
/* special case master if it's got PI order 0 lets keep it there
|
||||
* but still allow master to move if first non-master route has
|
||||
* presentation order 1
|
||||
*/
|
||||
if ((count == 0) && master_is_first && (stripable->presentation_info().order() == 1)) {
|
||||
master_is_first = false;
|
||||
order = 0;
|
||||
}
|
||||
|
||||
if (stripable->is_master() && (master_is_first == true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (order != stripable->presentation_info().order()) {
|
||||
stripable->set_presentation_order (order, false);
|
||||
change = true;
|
||||
}
|
||||
|
||||
++order;
|
||||
++count;
|
||||
}
|
||||
|
||||
if (change) {
|
||||
|
@ -714,6 +714,11 @@ Mixer_UI::sync_presentation_info_from_treeview ()
|
||||
bool change = false;
|
||||
uint32_t order = 0;
|
||||
|
||||
// special case master if it's got PI order 0 lets keep it there
|
||||
if (_session->master_out() && (_session->master_out()->presentation_info().order() == 0)) {
|
||||
order++;
|
||||
}
|
||||
|
||||
for (ri = rows.begin(); ri != rows.end(); ++ri) {
|
||||
bool visible = (*ri)[stripable_columns.visible];
|
||||
boost::shared_ptr<Stripable> stripable = (*ri)[stripable_columns.stripable];
|
||||
@ -736,6 +741,11 @@ Mixer_UI::sync_presentation_info_from_treeview ()
|
||||
|
||||
stripable->presentation_info().set_hidden (!visible);
|
||||
|
||||
// master may not get set here, but if it is zero keep it there
|
||||
if (stripable->is_master() && (stripable->presentation_info().order() == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (order != stripable->presentation_info().order()) {
|
||||
stripable->set_presentation_order (order, false);
|
||||
change = true;
|
||||
|
Loading…
Reference in New Issue
Block a user