summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_selection.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-04-18 22:12:01 +0000
committerCarl Hetherington <carl@carlh.net>2010-04-18 22:12:01 +0000
commit813037f5da97f5ed2fad3b671458ce47045cf116 (patch)
tree5382ee9c6631068148070a280c3ed7583ec02f5a /gtk2_ardour/editor_selection.cc
parent895bad1dcd817cb8ad32dc255a90271edd6659fb (diff)
Let the selection handle selecting tracks (or not) when other things are selected on them, so as to respect the configuration option of linking region to track selection. Fixes #2153.
git-svn-id: svn://localhost/ardour2/branches/3.0@6930 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r--gtk2_ardour/editor_selection.cc29
1 files changed, 1 insertions, 28 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index 5b29d8439f..e8feb7c085 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -979,12 +979,9 @@ Editor::invert_selection ()
* @param bottom Bottom (higher) y limit in trackview coordinates.
*/
bool
-Editor::select_all_within (
- nframes64_t start, nframes64_t end, double top, double bot, const TrackViewList& tracklist, Selection::Operation op
- )
+Editor::select_all_within (nframes64_t start, nframes64_t end, double top, double bot, const TrackViewList& tracklist, Selection::Operation op)
{
list<Selectable*> found;
- TrackViewList tracks;
for (TrackViewList::const_iterator iter = tracklist.begin(); iter != tracklist.end(); ++iter) {
@@ -992,37 +989,13 @@ Editor::select_all_within (
continue;
}
- list<Selectable*>::size_type const n = found.size ();
-
(*iter)->get_selectables (start, end, top, bot, found);
-
- if (n != found.size()) {
- tracks.push_back (*iter);
- }
}
if (found.empty()) {
return false;
}
- if (!tracks.empty()) {
-
- switch (op) {
- case Selection::Add:
- selection->add (tracks);
- break;
- case Selection::Toggle:
- selection->toggle (tracks);
- break;
- case Selection::Set:
- selection->set (tracks);
- break;
- case Selection::Extend:
- /* not defined yet */
- break;
- }
- }
-
begin_reversible_command (_("select all within"));
switch (op) {
case Selection::Add: