diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-31 02:46:04 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-31 02:46:04 +0000 |
commit | 415d3a5018738287c9175d84ce8346a7b47da4ff (patch) | |
tree | 6b4600a2045f493978a0409d68c6975f16ada401 /gtk2_ardour/selection.cc | |
parent | 0354401e0016060701cf4869557cff3004511733 (diff) |
unfinished work on selection/HiG details, restore range ops destroyed by autoscroll changes
git-svn-id: svn://localhost/trunk/ardour2@544 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r-- | gtk2_ardour/selection.cc | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 8424ff5378..3c1aea1ec8 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -199,18 +199,29 @@ Selection::toggle (AudioRegionView* r) { AudioRegionSelection::iterator i; - cerr << "about to toggle a regionview\n"; - if ((i = find (audio_regions.begin(), audio_regions.end(), r)) == audio_regions.end()) { audio_regions.add (r); - cerr << "\tadded\n"; } else { audio_regions.erase (i); - cerr << "\tremoved\n"; } RegionsChanged (); - cerr << "done\n"; +} + +void +Selection::toggle (vector<AudioRegionView*>& r) +{ + AudioRegionSelection::iterator i; + + for (vector<AudioRegionView*>::iterator x = r.begin(); x != r.end(); ++x) { + if ((i = find (audio_regions.begin(), audio_regions.end(), (*x))) == audio_regions.end()) { + audio_regions.add ((*x)); + } else { + audio_regions.erase (i); + } + } + + RegionsChanged (); } long @@ -633,8 +644,6 @@ Selection::add (list<Selectable*>& selectables) if (!autos.empty()) { add (autos); } - - cerr << "Selection @ " << this << " has " << points.size() << " points\n"; } void |