diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2020-01-22 10:30:05 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2020-01-22 10:33:15 -0600 |
commit | 142ce953dad2899e446147f73e07f3732db0dbc2 (patch) | |
tree | 172bad6f0ed3042f0f8bfbe4bf61eabbd8d541a4 /gtk2_ardour/editor_selection.cc | |
parent | 61e7f3176bfd8e423f72fc3f7d56d00ac930b796 (diff) |
Split Select-All-Tracks into 2 appropriately named actions
Existing function select-all-tracks is now renamed select-all-visible-lanes, to match its behavior.
New function select-all-tracks will select all Tracks, as the name implies.
To maintain consistency for those users who actively used select-all-tracks,
the default shortcut ctrl+t will continue calling select-all-visible-lanes.
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r-- | gtk2_ardour/editor_selection.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index fbdb485a3f..fa67ea4ab1 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -177,6 +177,20 @@ Editor::extend_selection_to_track (TimeAxisView& view) void Editor::select_all_tracks () { + TrackViewList tracks; + for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { + RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(*i); + if ( rtv && rtv->route()->is_track() ) { + tracks.push_back (*i); + } + } + PBD::Unwinder<bool> uw (_track_selection_change_without_scroll, true); + selection->set (tracks); +} + +void +Editor::select_all_visible_lanes () +{ TrackViewList visible_views; for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { if ((*i)->marked_for_display()) { @@ -1893,7 +1907,7 @@ Editor::set_selection_from_range (Location& loc) // if no tracks are selected, enable all tracks // (_something_ has to be selected for any range selection, otherwise the user won't see anything) if (selection->tracks.empty()) { - select_all_tracks(); + select_all_visible_lanes(); } commit_reversible_selection_op (); |