diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-10 11:29:57 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 14:59:30 -0500 |
commit | c4602603b4a229ab7d017f0733a9b771179b4319 (patch) | |
tree | 51dd3d1ba7d178910e74c1a8b352165f55167473 /libs/surfaces/push2/buttons.cc | |
parent | 6b080bf6ec5ae448a8f9f04a2bedbe81e74fff61 (diff) |
push2: make octave buttons actually work, with shift-press to reset to zero
Diffstat (limited to 'libs/surfaces/push2/buttons.cc')
-rw-r--r-- | libs/surfaces/push2/buttons.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/surfaces/push2/buttons.cc b/libs/surfaces/push2/buttons.cc index fe9e3322f4..316353f764 100644 --- a/libs/surfaces/push2/buttons.cc +++ b/libs/surfaces/push2/buttons.cc @@ -503,20 +503,28 @@ Push2::start_press_timeout (Button& button, ButtonID id) void Push2::button_octave_down () { + if (_modifier_state & ModShift) { + octave_shift = 0; + return; + } + int os = (max (-4, octave_shift - 1)); if (os != octave_shift) { octave_shift = os; - build_pad_table (); } } void Push2::button_octave_up () { + if (_modifier_state & ModShift) { + octave_shift = 0; + return; + } + int os = (min (4, octave_shift + 1)); if (os != octave_shift) { octave_shift = os; - build_pad_table (); } } |