Enable horizontal scrolling in midi regions when note is selected.
authorAndré Nusser <andre.nusser@googlemail.com>
Fri, 9 Oct 2015 14:14:15 +0000 (16:14 +0200)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 2 Dec 2015 23:36:59 +0000 (18:36 -0500)
The shortcut for 'change velocities together' had to be changed to
achieve that. The new shortcut is now primary+tertiary modifier +scroll,
i.e. ctrl+shift+scroll for the default keys.

gtk2_ardour/midi_region_view.cc

index 487a0c30797d64cd34e9f42a4f2e7aec6b5c1eef..3a3fe58be92de5a76056b8853cf1543bc0fb49ba 100644 (file)
@@ -697,9 +697,10 @@ MidiRegionView::scroll (GdkEventScroll* ev)
                return false;
        }
 
-       if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
-               /* XXX: bit of a hack; allow PrimaryModifier scroll through so that
-                  it still works for zoom.
+       if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier) ||
+           Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
+               /* XXX: bit of a hack; allow PrimaryModifier and TertiaryModifier scroll
+                * through so that it still works for navigation.
                */
                return false;
        }
@@ -707,7 +708,8 @@ MidiRegionView::scroll (GdkEventScroll* ev)
        hide_verbose_cursor ();
 
        bool fine = !Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier);
-       bool together = Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier);
+       Keyboard::ModifierMask mask_together(Keyboard::PrimaryModifier|Keyboard::TertiaryModifier);
+       bool together = Keyboard::modifier_state_contains (ev->state, mask_together);
 
        if (ev->direction == GDK_SCROLL_UP) {
                change_velocities (true, fine, false, together);