Fix my broken logic for control point selection.
authorCarl Hetherington <carl@carlh.net>
Fri, 20 Aug 2010 22:46:15 +0000 (22:46 +0000)
committerCarl Hetherington <carl@carlh.net>
Fri, 20 Aug 2010 22:46:15 +0000 (22:46 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7663 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/selection.cc

index c9d12f0694d177ee40099804117f567ab9453755..5b1bba1f3c76c4347a10cdebcd9a0c7ef80bace1 100644 (file)
@@ -936,7 +936,15 @@ Selection::set (ControlPoint* cp)
                return;
        }
 
-       points.clear ();
+       /* We're going to set up the PointSelection from the selected ControlPoints
+          on this point's line, so we need to deselect all ControlPoints before
+          we re-add this one.
+       */
+
+       for (uint32_t i = 0; i < cp->line().npoints(); ++i) {
+               cp->line().nth (i)->set_selected (false);
+       }
+
        vector<ControlPoint*> cps;
        cps.push_back (cp);
        add (cps);