diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-07 00:10:27 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 14:59:30 -0500 |
commit | 66453868cd18704babd08b52d4fd4ee5fcb67322 (patch) | |
tree | 893d372a92e84c7e128a6be5ddfec37fd3e49525 /libs/surfaces/push2/buttons.cc | |
parent | eff67c8a8fcb69d082fd7b68627cf32250ced156 (diff) |
push2: update GUI pad display when octave shift is used, or pad map is changed
Diffstat (limited to 'libs/surfaces/push2/buttons.cc')
-rw-r--r-- | libs/surfaces/push2/buttons.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libs/surfaces/push2/buttons.cc b/libs/surfaces/push2/buttons.cc index f4f05562e7..0c443cb1ec 100644 --- a/libs/surfaces/push2/buttons.cc +++ b/libs/surfaces/push2/buttons.cc @@ -593,13 +593,19 @@ Push2::start_press_timeout (Button& button, ButtonID id) void Push2::button_octave_down () { - octave_shift = (max (-4, octave_shift - 1)); - build_pad_table (); + int os = (max (-4, octave_shift - 1)); + if (os != octave_shift) { + octave_shift = os; + build_pad_table (); + } } void Push2::button_octave_up () { - octave_shift = (max (4, octave_shift + 1)); - build_pad_table (); + int os = (min (4, octave_shift + 1)); + if (os != octave_shift) { + octave_shift = os; + build_pad_table (); + } } |