diff options
author | David Robillard <d@drobilla.net> | 2014-12-07 19:53:46 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-07 20:37:46 -0500 |
commit | 603748d68af1009fac47b284bf6f8815745586c7 (patch) | |
tree | 25c24d8307841c09112585f0de46bf722d53863a /gtk2_ardour/editor_drag.h | |
parent | bbdad822cd7c1b8aec6d2785f7eb71d2ff988617 (diff) |
Unify gain and draw tools.
There might be a few special cases lingering around from attempts at magic tool
business, but this seems to work fine as far as I can tell.
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r-- | gtk2_ardour/editor_drag.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 2f4c2f2e0d..78b541d4f5 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -154,7 +154,7 @@ public: * @return true if this drag should happen in this mouse mode. */ virtual bool active (Editing::MouseMode m) { - return (m != Editing::MouseGain); + return true; } /** @return minimum number of frames (in x) and pixels (in y) that should be considered a movement */ @@ -523,6 +523,14 @@ public: void finished (GdkEvent *, bool); void aborted (bool); + bool active (Editing::MouseMode mode) { + return mode == Editing::MouseDraw; + } + + bool y_movement_matters () const { + return false; + } + private: double y_to_region (double) const; framecnt_t grid_frames (framepos_t) const; @@ -689,10 +697,6 @@ public: void finished (GdkEvent *, bool); void aborted (bool); - bool active (Editing::MouseMode) { - return true; - } - bool allow_vertical_autoscroll () const { return false; } @@ -820,10 +824,6 @@ public: void finished (GdkEvent *, bool); void aborted (bool); - bool active (Editing::MouseMode) { - return true; - } - private: AutomationLine* _line; @@ -843,10 +843,6 @@ public: void finished (GdkEvent *, bool); void aborted (bool); - bool active (Editing::MouseMode) { - return true; - } - private: ArdourCanvas::Line* _line; @@ -1054,10 +1050,6 @@ public: return false; } - bool active (Editing::MouseMode) { - return true; - } - private: void setup (std::list<boost::shared_ptr<AutomationLine> > const &); double y_fraction (boost::shared_ptr<AutomationLine>, double global_y_position) const; |