summaryrefslogtreecommitdiff
path: root/gtk2_ardour/group_tabs.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-01-26 19:20:40 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-01-27 22:17:53 +0100
commite5aa0d774e571878e600495cbabfe8073de0599c (patch)
treee7f3f36ca43cf2c577f5e818811b6b8dca3a7db8 /gtk2_ardour/group_tabs.cc
parent8cb3c42548e10539c1ccb1252189d65075132828 (diff)
use RAII for class-wide PresentationInfo::Change signal, along with properties to describe what changed
Diffstat (limited to 'gtk2_ardour/group_tabs.cc')
-rw-r--r--gtk2_ardour/group_tabs.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc
index 0d7eec1c7c..b27460de10 100644
--- a/gtk2_ardour/group_tabs.cc
+++ b/gtk2_ardour/group_tabs.cc
@@ -666,6 +666,9 @@ GroupTabs::collect (RouteGroup* g)
int diff = 0;
int coll = -1;
+
+ PresentationInfo::ChangeSuspender cs;
+
while (i != group_routes->end() && j != routes->end()) {
PresentationInfo::order_t const k = (*j)->presentation_info ().order();
@@ -679,21 +682,19 @@ GroupTabs::collect (RouteGroup* g)
--diff;
}
- (*j)->set_presentation_order (coll, false);
+ (*j)->set_presentation_order (coll);
++coll;
++i;
} else {
- (*j)->set_presentation_order (k + diff, false);
+ (*j)->set_presentation_order (k + diff);
}
++j;
}
-
- _session->notify_presentation_info_change ();
}
void
@@ -724,10 +725,11 @@ GroupTabs::remove_group (RouteGroup* g)
RouteList rl (*(g->route_list().get()));
_session->remove_route_group (*g);
+ PresentationInfo::ChangeSuspender cs;
+
for (RouteList::iterator i = rl.begin(); i != rl.end(); ++i) {
(*i)->presentation_info().PropertyChanged (Properties::color);
}
- PresentationInfo::Change (); // notify summary & port-matrix
}
/** Set the color of the tab of a route group */
@@ -841,7 +843,6 @@ GroupTabs::route_added_to_route_group (RouteGroup*, boost::weak_ptr<Route> w)
}
r->presentation_info().PropertyChanged (Properties::color);
- PresentationInfo::Change (); // notify summary & port-matrix
set_dirty ();
}
@@ -857,7 +858,6 @@ GroupTabs::route_removed_from_route_group (RouteGroup*, boost::weak_ptr<Route> w
}
r->presentation_info().PropertyChanged (Properties::color);
- PresentationInfo::Change (); // notify summary & port-matrix
set_dirty ();
}
@@ -865,8 +865,9 @@ GroupTabs::route_removed_from_route_group (RouteGroup*, boost::weak_ptr<Route> w
void
GroupTabs::emit_gui_changed_for_members (RouteGroup* rg)
{
+ PresentationInfo::ChangeSuspender cs;
+
for (RouteList::iterator i = rg->route_list()->begin(); i != rg->route_list()->end(); ++i) {
(*i)->presentation_info().PropertyChanged (Properties::color);
}
- PresentationInfo::Change (); // notify summary & port-matrix
}