summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-06-18 04:42:30 +1000
committernick_m <mainsbridge@gmail.com>2015-06-18 04:42:30 +1000
commit0280989276acefe43e1fc0f5617703afc72c0d62 (patch)
tree9989ec5dce126fde739450775f61236f8d89ec72 /gtk2_ardour/editor_drag.cc
parent639750f815a856bd9a61355e0d8e331e0fe215b6 (diff)
Single control points can now be dragged up and down properly.
- preserves the zero notch, but doesn't mess up the cumulative drag.
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 9f52dea5b6..056deea3f5 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -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);