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::WriterLock lm (_lock);
- for (SelectedStripables::iterator x = _stripables.begin(); x != _stripables.end(); ++x) {
+ for (SelectedStripables::iterator x = _stripables.begin(); x != _stripables.end(); ) {
if ((*x).stripable == id) {
- _stripables.erase (x);
- return;
+ _stripables.erase (x++);
+ /* keep going because there may be more than 1 pair of
+ stripable/automation-control in the selection.
+ */
+ } else {
+ ++x;
}
}
}