mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
use RAII for class-wide PresentationInfo::Change signal, along with properties to describe what changed
This commit is contained in:
parent
8cb3c42548
commit
e5aa0d774e
3 changed files with 17 additions and 19 deletions
|
|
@ -1019,6 +1019,8 @@ EditorRoutes::sync_presentation_info_from_treeview ()
|
|||
OrderingKeys sorted;
|
||||
const size_t cmp_max = rows.size ();
|
||||
|
||||
PresentationInfo::ChangeSuspender cs;
|
||||
|
||||
// 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++;
|
||||
|
|
@ -1059,7 +1061,7 @@ EditorRoutes::sync_presentation_info_from_treeview ()
|
|||
}
|
||||
|
||||
if (order != stripable->presentation_info().order()) {
|
||||
stripable->set_presentation_order (order, false);
|
||||
stripable->set_presentation_order (order);
|
||||
change = true;
|
||||
}
|
||||
|
||||
|
|
@ -1083,17 +1085,11 @@ EditorRoutes::sync_presentation_info_from_treeview ()
|
|||
n = 0;
|
||||
for (OrderingKeys::iterator sr = sorted.begin(); sr != sorted.end(); ++sr, ++n) {
|
||||
if (sr->stripable->presentation_info().order() != n) {
|
||||
sr->stripable->set_presentation_order (n, false);
|
||||
sr->stripable->set_presentation_order (n);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (change) {
|
||||
DEBUG_TRACE (DEBUG::OrderKeys, "... notify PI change from editor GUI\n");
|
||||
_session->notify_presentation_info_change ();
|
||||
_session->set_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue