summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas_events.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2015-01-29 11:23:49 -0600
committerBen Loftis <ben@harrisonconsoles.com>2015-01-29 11:23:49 -0600
commitf603ca174eb389d13c3a578e207cae1784c22fcc (patch)
treef18cbdb1d249fd982aa919ff83e6ded083654109 /gtk2_ardour/editor_canvas_events.cc
parent59bbb8500bcb4087a9761d7086cde49bc4a5b659 (diff)
in mixbus, treat the canvas rulers just like the canvas wrt mouse-wheel-zoom
Diffstat (limited to 'gtk2_ardour/editor_canvas_events.cc')
-rw-r--r--gtk2_ardour/editor_canvas_events.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index 18e07cc2f2..7b0adaa4ad 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -1035,12 +1035,29 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
switch (event->scroll.direction) {
case GDK_SCROLL_UP:
- temporal_zoom_step (false);
+
+ 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;
+ } else {
+ temporal_zoom_step (false);
+ }
handled = true;
break;
case GDK_SCROLL_DOWN:
- temporal_zoom_step (true);
+ 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;
+ } else {
+ temporal_zoom_step (true);
+ }
handled = true;
break;