diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-04-10 02:14:05 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-04-10 02:14:05 +0000 |
commit | 7e8a98224578e03e17fbf5e656241ff5ef1a0bc1 (patch) | |
tree | 33ceaf82af27e800a3b81b2c367522f2252a9fb4 /gtk2_ardour/time_axis_view.cc | |
parent | e9f9ca5278c6bcafd6a22ad273185c31664c32a5 (diff) |
Reinstate mouse scroll actions (audio clocks, shuttle wheel, faders), clearing selection is undoable, fix compiler warning, add modified patch by Jon Michael Smith for mouse wheel track height adjustment and vertical canvas scrolling (thanks Jon)
git-svn-id: svn://localhost/trunk/ardour2@449 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index fc467bee3d..1b6c1f390c 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -244,14 +244,14 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev) { switch (ev->direction) { case GDK_SCROLL_UP: - if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) { + if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) { step_height (true); return true; } break; case GDK_SCROLL_DOWN: - if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) { + if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) { step_height (false); return true; } @@ -328,30 +328,35 @@ TimeAxisView::hide () void TimeAxisView::step_height (bool bigger) { - switch (height) { - case Largest: - if (!bigger) set_height (Large); - break; - case Large: - if (bigger) set_height (Largest); - else set_height (Larger); - break; - case Larger: - if (bigger) set_height (Large); - else set_height (Normal); - break; - case Normal: - if (bigger) set_height (Larger); - else set_height (Smaller); - break; - case Smaller: - if (bigger) set_height (Normal); - else set_height (Small); - break; - case Small: - if (bigger) set_height (Smaller); - break; - } + + if (height == hLargest) { + if (!bigger) set_height (Large); + return; + } + if (height == hLarge) { + if (bigger) set_height (Largest); + else set_height (Larger); + return; + } + if (height == hLarger) { + if (bigger) set_height (Large); + else set_height (Normal); + return; + } + if (height == hNormal) { + if (bigger) set_height (Larger); + else set_height (Smaller); + return; + } + if (height == hSmaller) { + if (bigger) set_height (Normal); + else set_height (Small); + return; + } + if (height == hSmall) { + if (bigger) set_height (Smaller); + return; + } } void |