*/
+#include <vector>
+
#include "pbd/compose.h"
#include "pbd/signals.h"
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);
+ }
}
}
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);
+ }
}
}
}
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
CoreSelection::clear_stripables ()
{
bool send = false;
+ std::vector<boost::shared_ptr<Stripable> > s;
DEBUG_TRACE (DEBUG::Selection, "clearing s/c selection\n");
-
{
Glib::Threads::RWLock::WriterLock lm (_lock);
if (!_stripables.empty()) {
+
+ s.reserve (_stripables.size());
+
+ for (SelectedStripables::const_iterator x = _stripables.begin(); x != _stripables.end(); ++x) {
+ boost::shared_ptr<Stripable> sp = session.stripable_by_id ((*x).stripable);
+ if (sp) {
+ s.push_back (sp);
+ }
+ }
+
_stripables.clear ();
+
send = true;
DEBUG_TRACE (DEBUG::Selection, "cleared s/c selection\n");
}
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);
+ }
+
}
}
boost::shared_ptr<AutomationControl> c;
if (!s) {
+ /* some global automation control, not owned by a Stripable */
c = session.automation_control_by_id ((*x).controllable);
} else {
- c = s->automation_control ((*x).controllable);
+ /* automation control owned by a Stripable or one of its children */
+ c = s->automation_control_recurse ((*x).controllable);
}
if (s || c) {
Glib::Threads::RWLock::ReaderLock lm (_lock);
return _stripables.size();
}
-