diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-11-28 22:18:01 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-11-28 22:18:01 +0000 |
commit | d9032350e0f02f16dc633d876d7ede945e295044 (patch) | |
tree | 7a0d1dc25871b00da16b76ecaae327a57d047356 /gtk2_ardour/selection.cc | |
parent | c73f4fde75f085171f9acb028e721b46c78632b7 (diff) |
add set loop/punch from edit-range; don't select track when propagating region list selection into tracks
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2723 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r-- | gtk2_ardour/selection.cc | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 2091cae5fa..d794c0013b 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -338,24 +338,26 @@ Selection::add (const RegionSelection& rs) } void -Selection::add (RegionView* r) +Selection::add (RegionView* r, bool with_track) { if (find (regions.begin(), regions.end(), r) == regions.end()) { regions.add (r); - add (&r->get_trackview()); + if (with_track) { + add (&r->get_trackview()); + } RegionsChanged (); } } void -Selection::add (vector<RegionView*>& v) +Selection::add (vector<RegionView*>& v, bool with_track) { bool changed = false; for (vector<RegionView*>::iterator i = v.begin(); i != v.end(); ++i) { if (find (regions.begin(), regions.end(), (*i)) == regions.end()) { changed = regions.add ((*i)); - if (changed) { + if (with_track && changed) { add (&(*i)->get_trackview()); } } @@ -570,23 +572,25 @@ Selection::set (const RegionSelection& rs) } void -Selection::set (RegionView* r, bool also_clear_tracks) +Selection::set (RegionView* r, bool also_clear_tracks, bool with_track) { clear_regions (); if (also_clear_tracks) { clear_tracks (); } - add (r); + add (r, with_track); } void -Selection::set (vector<RegionView*>& v) +Selection::set (vector<RegionView*>& v, bool with_track) { - clear_tracks (); clear_regions (); - // make sure to deselect any automation selections - clear_points(); - add (v); + if (with_track) { + clear_tracks (); + // make sure to deselect any automation selections + clear_points(); + } + add (v, with_track); } long |