diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2016-01-07 21:55:22 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2016-01-21 11:25:56 +1000 |
commit | ab292183dd090db6533acd2d761199e1911c31dc (patch) | |
tree | 5ee212490786fa0d3ed5d689a3ac93796e7901c4 /gtk2_ardour/editor_canvas_events.cc | |
parent | 6ba6cce79905ea1fa831ca7525c16ca1878623a7 (diff) |
Bug #6722, Add UI config option to always use mouse position as zoom focus on scroll
This means that mouse zoom scrolling behaviour is consistent on the ruler
canvas area and track canvas area.
The config option defaults to true so this means the behaviour of Mixbus will
be unchanged but in Ardour the ruler area will now follow the option so by
default will use the mouse position as zoom focus when zooming rather than the
zoom focus setting.
Diffstat (limited to 'gtk2_ardour/editor_canvas_events.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas_events.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc index e821254c9b..58e3dda285 100644 --- a/gtk2_ardour/editor_canvas_events.cc +++ b/gtk2_ardour/editor_canvas_events.cc @@ -75,8 +75,11 @@ Editor::track_canvas_scroll (GdkEventScroll* ev) switch (direction) { case GDK_SCROLL_UP: if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomHorizontalModifier)) { - //for mouse-wheel zoom, force zoom-focus to mouse - temporal_zoom_step_mouse_focus (false); + if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) { + temporal_zoom_step_mouse_focus (false); + } else { + temporal_zoom_step (false); + } return true; } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollHorizontalModifier)) { scroll_left_step (); @@ -101,8 +104,11 @@ 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 - temporal_zoom_step_mouse_focus (true); + if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) { + temporal_zoom_step_mouse_focus (true); + } else { + temporal_zoom_step (true); + } return true; } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollHorizontalModifier)) { scroll_right_step (); @@ -1025,8 +1031,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType if (Keyboard::modifier_state_equals(event->scroll.state, Keyboard::ScrollHorizontalModifier)) { scroll_left_half_page (); - } else if (Profile->get_mixbus()) { - //for mouse-wheel zoom, force zoom-focus to mouse + } else if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) { temporal_zoom_step_mouse_focus (false); } else { temporal_zoom_step (false); @@ -1038,8 +1043,7 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType if (Keyboard::modifier_state_equals(event->scroll.state, Keyboard::ScrollHorizontalModifier)) { scroll_right_half_page (); - } else if (Profile->get_mixbus()) { - //for mouse-wheel zoom, force zoom-focus to mouse + } else if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) { temporal_zoom_step_mouse_focus (true); } else { temporal_zoom_step (true); |