diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-23 21:45:05 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-23 21:45:05 +0000 |
commit | 3cfa32d6c23b360f1772aaff0753972722dcc539 (patch) | |
tree | a23c845f055ec51605cdea33112db5e621be7f74 /gtk2_ardour/selection.cc | |
parent | d38944becdac0deec9cd4344efbc6b531db4161d (diff) |
a variety of bits and pieces for selection ops
git-svn-id: svn://localhost/ardour2/trunk@1375 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r-- | gtk2_ardour/selection.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 2ea9edfb2f..8a34752cdd 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -630,8 +630,16 @@ void Selection::toggle (const vector<AutomationSelectable*>& autos) { for (vector<AutomationSelectable*>::const_iterator x = autos.begin(); x != autos.end(); ++x) { - (*x)->set_selected (!(*x)->get_selected()); + if ((*x)->get_selected()) { + points.remove (**x); + } else { + points.push_back (**x); + } + + delete *x; } + + PointsChanged (); /* EMIT SIGNAL */ } void @@ -717,7 +725,6 @@ Selection::add (vector<AutomationSelectable*>& autos) { for (vector<AutomationSelectable*>::iterator i = autos.begin(); i != autos.end(); ++i) { points.push_back (**i); - delete *i; } PointsChanged (); |