summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-04-15 13:50:05 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-04-15 13:50:05 -0400
commit7e19053b88b4ab174052a44f2ee99dce92517aa9 (patch)
treed996b22ac8661421cc661d336322923deda00f73 /gtk2_ardour/editor_drag.cc
parentaf4539f857a14be3856da89a20811bf39e4ffb6e (diff)
Fix dragging objects on the canvas and remove redundant canvas groups
Delivery of fake motion events to the editor needed the event coordinates to be in canvas space, as they are with "real" events. Editor and other objects had many redundant groups from timbyr's work on gnomecanvas to scroll by moving groups. We don't need this anymore with cairo-canvas (though possibly a stationay background group for the canvas might be useful again one day as in the SAE logo. Its implementation would be fairly different though, since we would have to explicitly move the group on every scroll, since nothing else ever moves on scroll). Also tweaks to text item placement, and switch TimeAxisViewItem from name_pixbuf to name_text, since ArdourCanvas::Text is already "pixbuf optimized".
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 1b9a820ae6..09ac4ba120 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -637,6 +637,7 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
double const x_delta = compute_x_delta (event, &pending_region_position);
/* Work out the change in y */
+
int delta_time_axis_view = current_pointer_time_axis_view - _last_pointer_time_axis_view;
double delta_layer = current_pointer_layer - _last_pointer_layer;