use RAII for class-wide PresentationInfo::Change signal, along with properties to describe what changed

This commit is contained in:
Paul Davis 2017-01-26 19:20:40 +01:00
parent 8cb3c42548
commit e5aa0d774e
3 changed files with 17 additions and 19 deletions

View file

@ -714,6 +714,8 @@ Mixer_UI::sync_presentation_info_from_treeview ()
order++;
}
PresentationInfo::ChangeSuspender cs;
for (ri = rows.begin(); ri != rows.end(); ++ri) {
bool visible = (*ri)[stripable_columns.visible];
boost::shared_ptr<Stripable> stripable = (*ri)[stripable_columns.stripable];
@ -742,7 +744,7 @@ Mixer_UI::sync_presentation_info_from_treeview ()
}
if (order != stripable->presentation_info().order()) {
stripable->set_presentation_order (order, false);
stripable->set_presentation_order (order);
change = true;
}
@ -765,7 +767,7 @@ Mixer_UI::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);
}
}
}
@ -773,7 +775,6 @@ Mixer_UI::sync_presentation_info_from_treeview ()
if (change) {
DEBUG_TRACE (DEBUG::OrderKeys, "... notify PI change from mixer GUI\n");
_session->notify_presentation_info_change ();
_session->set_dirty();
}
}