summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_selection.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-10-05 00:42:09 +1100
committernick_m <mainsbridge@gmail.com>2015-10-20 00:53:29 +1100
commitafcba4d3d334939b21550a4d1f3a86e7dff5fbaf (patch)
treee4e19493b7e4835247d30d86be57ba340f47dfa6 /gtk2_ardour/editor_selection.cc
parent52a239a254fbe88988213463a7b7f94a4e9189c4 (diff)
Don't use the all_route_group() in Editor::set_selected_track_as_side_effect ().
- we don't appear to actually use it.
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r--gtk2_ardour/editor_selection.cc33
1 files changed, 4 insertions, 29 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index 27e17d5fcc..afddfad464 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -192,17 +192,10 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
group = clicked_routeview->route()->route_group();
}
- bool had_tracks = !selection->tracks.empty();
- RouteGroup& arg (_session->all_route_group());
-
switch (op) {
case Selection::Toggle:
if (selection->selected (clicked_axisview)) {
- if (arg.is_select() && arg.is_active()) {
- for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
- selection->remove(*i);
- }
- } else if (group && group->is_active()) {
+ if (group && group->is_active()) {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
if ((*i)->route_group() == group) {
selection->remove(*i);
@@ -212,11 +205,7 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
selection->remove (clicked_axisview);
}
} else {
- if (arg.is_select() && arg.is_active()) {
- for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
- selection->add(*i);
- }
- } else if (group && group->is_active()) {
+ if (group && group->is_active()) {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
if ((*i)->route_group() == group) {
selection->add(*i);
@@ -229,14 +218,7 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
break;
case Selection::Add:
- if (!had_tracks && arg.is_select() && arg.is_active()) {
- /* nothing was selected already, and all group is active etc. so use
- all tracks.
- */
- for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
- selection->add(*i);
- }
- } else if (group && group->is_active()) {
+ if (group && group->is_active()) {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
if ((*i)->route_group() == group) {
selection->add(*i);
@@ -249,14 +231,7 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
case Selection::Set:
selection->clear();
- if (!had_tracks && arg.is_select() && arg.is_active()) {
- /* nothing was selected already, and all group is active etc. so use
- all tracks.
- */
- for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
- selection->add(*i);
- }
- } else if (group && group->is_active()) {
+ if (group && group->is_active()) {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end (); ++i) {
if ((*i)->route_group() == group) {
selection->add(*i);