diff options
author | Carl Hetherington <carl@carlh.net> | 2011-02-17 22:35:42 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-02-17 22:35:42 +0000 |
commit | 6117b74bb9c8d9f84ac962be48ca382db90ed983 (patch) | |
tree | 5937eab072c2fd91052788242cf1ee911c570a3e /gtk2_ardour/time_axis_view.cc | |
parent | 2ffc0cbe25287e504fc7e8ac3a07800405affeb4 (diff) |
Make sense of parameter to tav_zoom_step match up with coarser as used for temporal zoom.
git-svn-id: svn://localhost/ardour2/branches/3.0@8896 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 7c47d5a5e0..3cf1377c3b 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -301,7 +301,7 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev) switch (ev->direction) { case GDK_SCROLL_UP: if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) { - step_height (true); + step_height (false); return true; } else if (Keyboard::no_modifiers_active (ev->state)) { _editor.scroll_tracks_up_line(); @@ -311,7 +311,7 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev) case GDK_SCROLL_DOWN: if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) { - step_height (false); + step_height (true); return true; } else if (Keyboard::no_modifiers_active (ev->state)) { _editor.scroll_tracks_down_line(); @@ -382,21 +382,16 @@ TimeAxisView::hide () Hiding (); } +/** Steps through the defined heights for this TrackView. + * @param coarser true if stepping should decrease in size, otherwise false. + */ void -TimeAxisView::step_height (bool bigger) +TimeAxisView::step_height (bool coarser) { static const uint32_t step = 25; - if (bigger) { - if (height == preset_height(HeightSmall)) { - set_height_enum (HeightSmaller); - } else if (height == preset_height(HeightSmaller)) { - set_height_enum (HeightNormal); - } else { - set_height (height + step); - } - - } else { + if (coarser) { + if (height == preset_height (HeightSmall)) { return; } @@ -407,7 +402,18 @@ TimeAxisView::step_height (bool bigger) set_height_enum (HeightSmaller); } else { set_height (height - step); - } + } + + } else { + + if (height == preset_height(HeightSmall)) { + set_height_enum (HeightSmaller); + } else if (height == preset_height(HeightSmaller)) { + set_height_enum (HeightNormal); + } else { + set_height (height + step); + } + } } |