summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-17 16:57:21 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-17 16:57:21 +0000
commit95377c141c404c959797028b737ca747c1bccadb (patch)
treec3cd4d4e6f24071ba1edfd0ad0863814bd0f370e /gtk2_ardour/editor.h
parentadd52f1c0ef787a580c44d719bc6e4c9c5ae09a4 (diff)
Hacky fix for track height step losing 'grip' on the
track being resized (#4503). git-svn-id: svn://localhost/ardour2/branches/3.0@12747 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.h')
-rw-r--r--gtk2_ardour/editor.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 5134b6a7a1..a2d7c93fd3 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -470,6 +470,14 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void get_pointer_position (double &, double &) const;
+ TimeAxisView* stepping_axis_view () {
+ return _stepping_axis_view;
+ }
+
+ void set_stepping_axis_view (TimeAxisView* v) {
+ _stepping_axis_view = v;
+ }
+
protected:
void map_transport_state ();
void map_position_change (framepos_t);
@@ -2102,6 +2110,17 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
/** Flag for a bit of a hack wrt control point selection; see set_selected_control_point_from_click */
bool _control_point_toggled_on_press;
+ /** This is used by TimeAxisView to keep a track of the TimeAxisView that is currently being
+ stepped in height using Shift-Scrollwheel. When a scroll event occurs, we do the step on
+ this _stepping_axis_view if it is non-0 (and we set up this _stepping_axis_view with the
+ TimeAxisView underneath the mouse if it is 0). Then Editor resets _stepping_axis_view when
+ the shift key is released. In this (hacky) way, pushing shift and moving the scroll wheel
+ will operate on the same track until shift is released (rather than skipping about to whatever
+ happens to be underneath the mouse at the time).
+ */
+ TimeAxisView* _stepping_axis_view;
+ void shift_key_released ();
+
friend class Drag;
friend class RegionDrag;
friend class RegionMoveDrag;