summaryrefslogtreecommitdiff
path: root/gtk2_ardour/selection.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-01-23 21:45:05 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-01-23 21:45:05 +0000
commit3cfa32d6c23b360f1772aaff0753972722dcc539 (patch)
treea23c845f055ec51605cdea33112db5e621be7f74 /gtk2_ardour/selection.cc
parentd38944becdac0deec9cd4344efbc6b531db4161d (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.cc11
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 ();