mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
change the way ControlProtocols (control surfaces) are notified and handle Stripable selection changes
The Editor continues to notify them, but via a direct call to ControlProtocolManager, not a signal. The CP Manager calls the ControlProtocol static method to set up static data structures holding selection info for all surfaces and then notifies each surface/protocol that selection has changed.
This commit is contained in:
parent
efc2660fec
commit
eb3f50e15c
23 changed files with 64 additions and 83 deletions
|
|
@ -2369,10 +2369,11 @@ MackieControlProtocol::is_mapped (boost::shared_ptr<Stripable> r) const
|
|||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::update_selected (boost::shared_ptr<Stripable> s, bool became_selected)
|
||||
MackieControlProtocol::stripable_selection_changed ()
|
||||
{
|
||||
if (became_selected) {
|
||||
boost::shared_ptr<Stripable> s = first_selected_stripable ();
|
||||
|
||||
if (s) {
|
||||
check_fader_automation_state ();
|
||||
|
||||
/* It is possible that first_selected_route() may return null if we
|
||||
|
|
@ -2382,7 +2383,7 @@ MackieControlProtocol::update_selected (boost::shared_ptr<Stripable> s, bool bec
|
|||
* set_subview_mode() will fail, and we will reset to None.
|
||||
*/
|
||||
|
||||
if (set_subview_mode (_subview_mode, first_selected_stripable())) {
|
||||
if (set_subview_mode (_subview_mode, s)) {
|
||||
set_subview_mode (None, boost::shared_ptr<Stripable>());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@ class MackieControlProtocol
|
|||
bool is_midi_track (boost::shared_ptr<ARDOUR::Stripable>) const;
|
||||
bool is_mapped (boost::shared_ptr<ARDOUR::Stripable>) const;
|
||||
boost::shared_ptr<ARDOUR::Stripable> first_selected_stripable () const;
|
||||
void update_selected (boost::shared_ptr<ARDOUR::Stripable>, bool selected);
|
||||
|
||||
void check_fader_automation_state ();
|
||||
void update_fader_automation_state ();
|
||||
|
|
@ -360,8 +359,7 @@ class MackieControlProtocol
|
|||
void clear_surfaces ();
|
||||
void force_special_stripable_to_strip (boost::shared_ptr<ARDOUR::Stripable> r, uint32_t surface, uint32_t strip_number);
|
||||
void build_button_map ();
|
||||
void gui_track_selection_changed (ARDOUR::StripableNotificationListPtr, bool save_list);
|
||||
void _gui_track_selection_changed (ARDOUR::StripableNotificationList*, bool save_list, bool gui_did_change);
|
||||
void stripable_selection_changed ();
|
||||
int ipmidi_restart ();
|
||||
void initialize ();
|
||||
int set_device_info (const std::string& device_name);
|
||||
|
|
|
|||
|
|
@ -381,7 +381,6 @@ Strip::notify_property_changed (const PropertyChange& what_changed)
|
|||
if (what_changed.contains (ARDOUR::Properties::selected)) {
|
||||
if (_stripable) {
|
||||
_surface->write (_select->set_state (_stripable->is_selected()));
|
||||
_surface->mcp().update_selected (_stripable, _stripable->is_selected());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue