mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
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:
parent
8687895abb
commit
034db5fb1c
17 changed files with 192 additions and 240 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue