Apply Select property of route groups at the Selection object level. Accordingly

simplify code related to selecting tracks.  Add a TrackViewList object rather than
"abusing" TrackSelection in lots of places.


git-svn-id: svn://localhost/ardour2/branches/3.0@6358 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-12-13 19:09:52 +00:00
parent 8687895abb
commit 034db5fb1c
17 changed files with 192 additions and 240 deletions

View file

@ -1176,33 +1176,23 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev)
return;
}
PublicEditor::TrackViewList* tracks = _editor.get_valid_views (this, _route->route_group());
switch (ArdourKeyboard::selection_type (ev->state)) {
case Selection::Toggle:
_editor.get_selection().toggle (*tracks);
_editor.get_selection().toggle (this);
break;
case Selection::Set:
_editor.get_selection().set (*tracks);
_editor.get_selection().set (this);
break;
case Selection::Extend:
if (tracks->size() > 1) {
/* add each one, do not "extend" */
_editor.get_selection().add (*tracks);
} else {
/* extend to the single track */
_editor.extend_selection_to_track (*tracks->front());
}
_editor.extend_selection_to_track (*this);
break;
case Selection::Add:
_editor.get_selection().add (*tracks);
_editor.get_selection().add (this);
break;
}
delete tracks;
}
void