From feab5ef91e0b817bf9f92c1ad98a666852285e12 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 May 2017 18:28:49 +0100 Subject: re-order per-object and global selection change signals --- libs/ardour/selection.cc | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'libs/ardour/selection.cc') diff --git a/libs/ardour/selection.cc b/libs/ardour/selection.cc index 6ae32d497e..3193b12b20 100644 --- a/libs/ardour/selection.cc +++ b/libs/ardour/selection.cc @@ -73,13 +73,6 @@ CoreSelection::add (boost::shared_ptr s, boost::shared_ptrname(), c)); - /* send per-object signal to notify interested parties - the selection status has changed - */ - if (s) { - PropertyChange pc (Properties::selected); - s->PropertyChanged (pc); - } send = true; } else { DEBUG_TRACE (DEBUG::Selection, string_compose ("%1/%2 already in s/c selection\n", s->name(), c)); @@ -88,6 +81,13 @@ CoreSelection::add (boost::shared_ptr s, boost::shared_ptrPropertyChanged (pc); + } } } @@ -105,19 +105,19 @@ CoreSelection::remove (boost::shared_ptr s, boost::shared_ptrPropertyChanged (pc); - } send = true; } } if (send) { send_selection_change (); + /* send per-object signal to notify interested parties + the selection status has changed + */ + if (s) { + PropertyChange pc (Properties::selected); + s->PropertyChanged (pc); + } } } @@ -136,16 +136,17 @@ CoreSelection::set (boost::shared_ptr s, boost::shared_ptrname(), c)); - /* send per-object signal to notify interested parties - the selection status has changed - */ - if (s) { - PropertyChange pc (Properties::selected); - s->PropertyChanged (pc); - } } send_selection_change (); + + /* send per-object signal to notify interested parties + the selection status has changed + */ + if (s) { + PropertyChange pc (Properties::selected); + s->PropertyChanged (pc); + } } void @@ -177,13 +178,14 @@ CoreSelection::clear_stripables () } if (send) { + send_selection_change (); + PropertyChange pc (Properties::selected); for (std::vector >::iterator ss = s.begin(); ss != s.end(); ++ss) { (*ss)->PropertyChanged (pc); } - send_selection_change (); } } -- cgit v1.2.3