diff options
author | Len Ovens <len@ovenwerks.net> | 2016-01-15 13:16:24 -0800 |
---|---|---|
committer | Len Ovens <len@ovenwerks.net> | 2016-01-15 13:16:24 -0800 |
commit | 6b356448e314f7a280f0a04b5bccd221876c62dd (patch) | |
tree | 32ae829d4ebbf4f2e7ec809e2c02ab789e5d86ac | |
parent | d14e3ccc249e64ab48bdc9cf6be428b57d1f0bdc (diff) |
Mackie Control: Don't show hidden routes.
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 24 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.h | 1 |
2 files changed, 17 insertions, 8 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index ea26cfece8..66ab231141 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -298,11 +298,13 @@ MackieControlProtocol::get_sorted_routes() if (route->route_group()) { route->route_group()->set_active (true, this); } - sorted.push_back (route); - remote_ids.insert (route->remote_control_id()); + if (! is_hidden(route)) { + sorted.push_back (route); + remote_ids.insert (route->remote_control_id()); + } break; case AudioTracks: - if (is_audio_track(route)) { + if (is_audio_track(route) && !is_hidden(route)) { if (route->route_group()) { route->route_group()->set_active (true, this); } @@ -319,7 +321,7 @@ MackieControlProtocol::get_sorted_routes() } #endif } else { - if (!is_track(route)) { + if (!is_track(route) && !is_hidden(route)) { if (route->route_group()) { route->route_group()->set_active (true, this); } @@ -329,7 +331,7 @@ MackieControlProtocol::get_sorted_routes() } break; case MidiTracks: - if (is_midi_track(route)) { + if (is_midi_track(route) && !is_hidden(route)) { if (route->route_group()) { route->route_group()->set_active (true, this); } @@ -340,7 +342,7 @@ MackieControlProtocol::get_sorted_routes() case Plugins: break; case Auxes: // in ardour, for now aux and buss are same. for mixbus, see "Busses" case above - if (!is_track(route)) { + if (!is_track(route) && !is_hidden(route)) { if (route->route_group()) { route->route_group()->set_active (true, this); } @@ -348,8 +350,8 @@ MackieControlProtocol::get_sorted_routes() remote_ids.insert (route->remote_control_id()); } break; - case Selected: // For example: a group - if (selected(route)) { + case Selected: // For example: a group (this is USER) + if (selected(route) && !is_hidden(route)) { /* Selected may be a group in which case we want to * control each track separately. */ @@ -2219,6 +2221,12 @@ MackieControlProtocol::selected (boost::shared_ptr<Route> r) const return false; } +bool +MackieControlProtocol::is_hidden (boost::shared_ptr<Route> r) const +{ + return ((r->remote_control_id()) >>31) != 0; +} + boost::shared_ptr<Route> MackieControlProtocol::first_selected_route () const { diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index a5e23403dc..f5352731c5 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -160,6 +160,7 @@ class MackieControlProtocol bool is_audio_track (boost::shared_ptr<ARDOUR::Route>) const; bool is_midi_track (boost::shared_ptr<ARDOUR::Route>) const; bool selected (boost::shared_ptr<ARDOUR::Route>) const; + bool is_hidden (boost::shared_ptr<ARDOUR::Route>) const; boost::shared_ptr<ARDOUR::Route> first_selected_route () const; void set_view_mode (ViewMode); |