diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-12 11:09:49 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-12 11:09:49 -0400 |
commit | ecfd2a74552a45781e4d57a09e73313cd8815a4d (patch) | |
tree | fbd236dd6b63074b8bebe4aa6eb0b129236bff7a /gtk2_ardour/editor_canvas.cc | |
parent | fcb423f3f69225e0be896cb10b34b9628ab666f2 (diff) |
remove all unit-based methods from (Public)Editor; rationalize Editor::event_frame() to clearly identify whether the passed-in GdkEvent has window units or canvas units (the latter will be true for all events that are handled by the canvas and then passed to Editor
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index d7a5373637..5b5ae3e0de 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -422,8 +422,6 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context, vector<string> paths; GdkEvent ev; framepos_t frame; - double wx; - double wy; double cy; if (convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) { @@ -431,13 +429,11 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context, /* D-n-D coordinates are window-relative, so convert to "world" coordinates */ - _track_canvas_viewport->window_to_canvas (x, y, wx, wy); - ev.type = GDK_BUTTON_RELEASE; - ev.button.x = wx; - ev.button.y = wy; + ev.button.x = x; + ev.button.y = y; - frame = event_frame (&ev, 0, &cy); + frame = window_event_frame (&ev, 0, &cy); snap_to (frame); @@ -916,7 +912,7 @@ Editor::update_canvas_now () double Editor::horizontal_position () const { - return frame_to_unit (leftmost_frame); + return frame_to_pixel (leftmost_frame); } void |