summaryrefslogtreecommitdiff
path: root/libs/ardour/selection.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-05-11 18:28:49 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-05-11 18:29:03 +0100
commitfeab5ef91e0b817bf9f92c1ad98a666852285e12 (patch)
treeb50febecf6f985ba500f3422c1184e1fefeeab1c /libs/ardour/selection.cc
parentd42da9046e787d3ca7b3c106c5f71315f2bc78b0 (diff)
re-order per-object and global selection change signals
Diffstat (limited to 'libs/ardour/selection.cc')
-rw-r--r--libs/ardour/selection.cc46
1 files changed, 24 insertions, 22 deletions
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<Stripable> s, boost::shared_ptr<Automation
if (_stripables.insert (ss).second) {
DEBUG_TRACE (DEBUG::Selection, string_compose ("added %1/%2 to s/c selection\n", s->name(), 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<Stripable> s, boost::shared_ptr<Automation
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);
+ }
}
}
@@ -105,19 +105,19 @@ CoreSelection::remove (boost::shared_ptr<Stripable> s, boost::shared_ptr<Automat
if (i != _stripables.end()) {
_stripables.erase (i);
DEBUG_TRACE (DEBUG::Selection, string_compose ("removed %1/%2 from s/c selection\n", s, 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;
}
}
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<Stripable> s, boost::shared_ptr<Automation
_stripables.clear ();
_stripables.insert (ss);
DEBUG_TRACE (DEBUG::Selection, string_compose ("set s/c selection to %1/%2\n", s->name(), 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<boost::shared_ptr<Stripable> >::iterator ss = s.begin(); ss != s.end(); ++ss) {
(*ss)->PropertyChanged (pc);
}
- send_selection_change ();
}
}