libardour now has CoreSelection object to manage selection status of Stripables and AutomationControls

This commit is contained in:
Paul Davis 2017-05-05 12:31:21 +01:00
parent ccd19ed061
commit 0c035778e1
26 changed files with 120 additions and 71 deletions

View file

@ -335,7 +335,7 @@ MackieControlProtocol::get_sorted_stripables()
}
break;
case Selected: // For example: a group (this is USER)
if (s->presentation_info().selected() && !s->presentation_info().hidden()) {
if (s->is_selected() && !s->presentation_info().hidden()) {
sorted.push_back (s);
}
break;
@ -2038,7 +2038,7 @@ MackieControlProtocol::select_range (uint32_t pressed)
return;
}
if (stripables.size() == 1 && ControlProtocol::last_selected().size() == 1 && stripables.front()->presentation_info().selected()) {
if (stripables.size() == 1 && ControlProtocol::last_selected().size() == 1 && stripables.front()->is_selected()) {
/* cancel selection for one and only selected stripable */
ToggleStripableSelection (stripables.front());
} else {

View file

@ -380,8 +380,8 @@ Strip::notify_property_changed (const PropertyChange& what_changed)
if (what_changed.contains (ARDOUR::Properties::selected)) {
if (_stripable) {
_surface->write (_select->set_state (_stripable->presentation_info().selected()));
_surface->mcp().update_selected (_stripable, _stripable->presentation_info().selected());
_surface->write (_select->set_state (_stripable->is_selected()));
_surface->mcp().update_selected (_stripable, _stripable->is_selected());
}
}
}