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
This commit is contained in:
parent
895bad1dcd
commit
813037f5da
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user