diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2016-01-07 21:19:09 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2016-01-21 11:25:56 +1000 |
commit | 6ba6cce79905ea1fa831ca7525c16ca1878623a7 (patch) | |
tree | 7deb05331c00cabf986beff872cf05ae06a24b51 /gtk2_ardour/editor_canvas_events.cc | |
parent | 72bdfc38a8aabd5c1277825f84969d30adadb1af (diff) |
Refactor code into Editor::temporal_zoom_step_mouse_focus method
Diffstat (limited to 'gtk2_ardour/editor_canvas_events.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas_events.cc | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc index 7dcfe37fe5..e821254c9b 100644 --- a/gtk2_ardour/editor_canvas_events.cc +++ b/gtk2_ardour/editor_canvas_events.cc @@ -76,10 +76,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev) case GDK_SCROLL_UP: if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomHorizontalModifier)) { //for mouse-wheel zoom, force zoom-focus to mouse - Editing::ZoomFocus temp_focus = zoom_focus; - zoom_focus = Editing::ZoomFocusMouse; - temporal_zoom_step (false); - zoom_focus = temp_focus; + temporal_zoom_step_mouse_focus (false); return true; } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollHorizontalModifier)) { scroll_left_step (); @@ -105,10 +102,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev) case GDK_SCROLL_DOWN: if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomHorizontalModifier)) { //for mouse-wheel zoom, force zoom-focus to mouse - Editing::ZoomFocus temp_focus = zoom_focus; - zoom_focus = Editing::ZoomFocusMouse; - temporal_zoom_step (true); - zoom_focus = temp_focus; + temporal_zoom_step_mouse_focus (true); return true; } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollHorizontalModifier)) { scroll_right_step (); @@ -1033,10 +1027,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType scroll_left_half_page (); } else if (Profile->get_mixbus()) { //for mouse-wheel zoom, force zoom-focus to mouse - Editing::ZoomFocus temp_focus = zoom_focus; - zoom_focus = Editing::ZoomFocusMouse; - temporal_zoom_step (false); - zoom_focus = temp_focus; + temporal_zoom_step_mouse_focus (false); } else { temporal_zoom_step (false); } @@ -1049,10 +1040,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType scroll_right_half_page (); } else if (Profile->get_mixbus()) { //for mouse-wheel zoom, force zoom-focus to mouse - Editing::ZoomFocus temp_focus = zoom_focus; - zoom_focus = Editing::ZoomFocusMouse; - temporal_zoom_step (true); - zoom_focus = temp_focus; + temporal_zoom_step_mouse_focus (true); } else { temporal_zoom_step (true); } |