diff options
author | Carl Hetherington <carl@carlh.net> | 2012-06-17 16:57:21 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-06-17 16:57:21 +0000 |
commit | 95377c141c404c959797028b737ca747c1bccadb (patch) | |
tree | c3cd4d4e6f24071ba1edfd0ad0863814bd0f370e /gtk2_ardour/time_axis_view.cc | |
parent | add52f1c0ef787a580c44d719bc6e4c9c5ae09a4 (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/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index ddf03e968e..ee5c7c1c2a 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -48,6 +48,7 @@ #include "utils.h" #include "streamview.h" #include "editor_drag.h" +#include "editor.h" #include "i18n.h" @@ -317,7 +318,12 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev) switch (ev->direction) { case GDK_SCROLL_UP: if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) { - step_height (false); + /* See Editor::_stepping_axis_view for notes on this hack */ + Editor& e = dynamic_cast<Editor&> (_editor); + if (!e.stepping_axis_view ()) { + e.set_stepping_axis_view (this); + } + e.stepping_axis_view()->step_height (false); return true; } else if (Keyboard::no_modifiers_active (ev->state)) { _editor.scroll_tracks_up_line(); @@ -327,7 +333,12 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev) case GDK_SCROLL_DOWN: if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) { - step_height (true); + /* See Editor::_stepping_axis_view for notes on this hack */ + Editor& e = dynamic_cast<Editor&> (_editor); + if (!e.stepping_axis_view ()) { + e.set_stepping_axis_view (this); + } + e.stepping_axis_view()->step_height (true); return true; } else if (Keyboard::no_modifiers_active (ev->state)) { _editor.scroll_tracks_down_line(); |