in mixbus, treat the canvas rulers just like the canvas wrt mouse-wheel-zoom
authorBen Loftis <ben@harrisonconsoles.com>
Thu, 29 Jan 2015 17:23:49 +0000 (11:23 -0600)
committerBen Loftis <ben@harrisonconsoles.com>
Thu, 29 Jan 2015 17:23:49 +0000 (11:23 -0600)
gtk2_ardour/editor_canvas_events.cc

index 18e07cc2f2b81aba95d1f34b3e9bbdfb7c0b18e3..7b0adaa4ad672f1888914f58f47e799877318c31 100644 (file)
@@ -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;