Remove suspect pixel-based control point x position clamping; this may cause issues...
authorCarl Hetherington <carl@carlh.net>
Thu, 31 May 2012 17:07:47 +0000 (17:07 +0000)
committerCarl Hetherington <carl@carlh.net>
Thu, 31 May 2012 17:07:47 +0000 (17:07 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12504 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/automation_line.cc

index 54755d36c5d4c5cfbe8889f8fdc40e06f3695e82..7e72d3e7d42c433aa88a9b864ce10b08ad5d180e 100644 (file)
@@ -495,30 +495,9 @@ AutomationLine::drag_motion (double x, float fraction, bool ignore_x, bool with_
 
        /* clamp x */
        for (list<ControlPoint*>::iterator i = points.begin(); i != points.end(); ++i) {
-
                if ((*i)->can_slide() && !ignore_x) {
-
-                       /* clamp min x */
-                       double const a = (*i)->get_x() + dx;
-                       double const b = before_x + 1;
-                       if (a < b) {
-                               dx += b - a;
-                       }
-
-                       /* clamp max x */
-                       if (after) {
-
-                               if (after_x - before_x < 2) {
-                                       /* after and before are very close, so just leave this alone */
-                                       dx = 0;
-                               } else {
-                                       double const a = (*i)->get_x() + dx;
-                                       double const b = after_x - 1;
-                                       if (a > b) {
-                                               dx -= a - b;
-                                       }
-                               }
-                       }
+                       x = max (x, before_x);
+                       x = min (x, after_x);
                }
        }