diff options
author | André Nusser <andre.nusser@googlemail.com> | 2015-10-09 16:14:15 +0200 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-12-02 18:36:59 -0500 |
commit | 6389c52d3c7a6ff8cfd632b4f4945233390e6aa9 (patch) | |
tree | b93f4e25d5d28c934853a04a06ecfac4261069a8 /gtk2_ardour | |
parent | 90275ded6a56cc39bd3ffbed292e7bfa7ff7345e (diff) |
Enable horizontal scrolling in midi regions when note is selected.
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.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 487a0c3079..3a3fe58be9 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -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); |