From 40e2f9a68ab15b5accd1cd992c07d906d7d9b637 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Thu, 20 Jul 2017 09:51:26 -0500 Subject: CursorZoomDrag rework: * If the use-time-rulers-to-zoom option is enabled, -all- cursor drags can zoom. * Behavior has been tweaked so it is easy to scroll without zooming, if you want to. --- gtk2_ardour/editor_drag.h | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'gtk2_ardour/editor_drag.h') diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 17e459ba67..f2b08d4cfe 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -907,6 +907,12 @@ private: EditorCursor& _cursor; bool _stop; ///< true to stop the transport on starting the drag, otherwise false double _grab_zoom; ///< editor frames per unit when our grab started + + //used for zooming + int _last_mx; + int _last_my; + int _last_dx; + int _last_y_delta; }; /** Region fade-in drag */ @@ -1295,21 +1301,5 @@ private: bool start; }; -class RulerZoomDrag : public Drag -{ -public: - RulerZoomDrag (Editor*, ArdourCanvas::Item*); - - void start_grab (GdkEvent*, Gdk::Cursor* c = 0); - void motion (GdkEvent *, bool); - void finished (GdkEvent*, bool); - void aborted (bool); - - virtual bool allow_vertical_autoscroll () const { - return false; - } - -}; - #endif /* __gtk2_ardour_editor_drag_h_ */ -- cgit v1.2.3