13
0

rbselect selects all tracks that had selectables

git-svn-id: svn://localhost/ardour2/trunk@1352 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-01-18 01:31:16 +00:00
parent 22d4a0a8c3
commit 6b0e0e379b
2 changed files with 15 additions and 4 deletions

View File

@ -2929,10 +2929,13 @@ Editor::set_selected_track (TimeAxisView& view, Selection::Operation op, bool no
for some reason.
*/
if (selection->tracks.size() <= 1 || !no_remove) {
if (selection->tracks.empty()) {
selection->set (&view);
commit = true;
} else if (selection->tracks.size() == 1 || !no_remove) {
selection->set (&view);
commit = true;
}
commit = true;
}
break;

View File

@ -1375,13 +1375,21 @@ Editor::invert_selection ()
bool
Editor::select_all_within (nframes_t start, nframes_t end, double top, double bot, Selection::Operation op)
{
list<Selectable *> touched;
list<Selectable*> touched;
list<Selectable*>::size_type n = 0;
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
if ((*iter)->hidden()) {
continue;
}
n = touched.size();
(*iter)->get_selectables (start, end, top, bot, touched);
if (n != touched.size()) {
selection->add (*iter);
}
}
begin_reversible_command (_("select all within"));