*/
+#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->presentation_info().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->presentation_info().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->presentation_info().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)->presentation_info().PropertyChanged (pc);
+ }
+
}
}
_stripables.insert (ss);
}
- std::cerr << "set state: " << _stripables.size() << std::endl;
-
return 0;
}
Glib::Threads::RWLock::ReaderLock lm (_lock);
return _stripables.size();
}
-