Single control points can now be dragged up and down properly.
authornick_m <mainsbridge@gmail.com>
Wed, 17 Jun 2015 18:42:30 +0000 (04:42 +1000)
committernick_m <mainsbridge@gmail.com>
Wed, 17 Jun 2015 18:42:30 +0000 (04:42 +1000)
- preserves the zero notch, but doesn't mess up the cumulative drag.

gtk2_ardour/editor_drag.cc

index 9f52dea5b6aa766481f75f21f6f4b604868efa25..056deea3f5e52b6cf8fb312bff03161e9a31f533 100644 (file)
@@ -4091,11 +4091,6 @@ ControlPointDrag::motion (GdkEvent* event, bool)
        // positive side of zero
        double const zero_gain_y = (1.0 - _zero_gain_fraction) * _point->line().height() - .01;
 
-       // make sure we hit zero when passing through
-       if ((cy < zero_gain_y && (cy - dy) > zero_gain_y) || (cy > zero_gain_y && (cy - dy) < zero_gain_y)) {
-               cy = zero_gain_y;
-       }
-
        if (_x_constrained) {
                cx = _fixed_grab_x;
        }
@@ -4106,6 +4101,11 @@ ControlPointDrag::motion (GdkEvent* event, bool)
        _cumulative_x_drag = cx - _fixed_grab_x;
        _cumulative_y_drag = cy - _fixed_grab_y;
 
+       // make sure we hit zero when passing through
+       if ((cy < zero_gain_y && (cy - dy) > zero_gain_y) || (cy > zero_gain_y && (cy - dy) < zero_gain_y)) {
+               cy = zero_gain_y;
+       }
+
        cx = max (0.0, cx);
        cy = max (0.0, cy);
        cy = min ((double) _point->line().height(), cy);