summaryrefslogtreecommitdiff
path: root/plugingui/drumkittab.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2018-06-16 17:37:15 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-08-12 11:13:53 +0200
commit63a68ebd3f8c0118c1fec2f4d6900a0af253a2da (patch)
treeafbf9bdf26866534295db4135a3d8230f3611dcd /plugingui/drumkittab.cc
parent874fb66295fe5811016c6c5fe0e86a3d0cf9b109 (diff)
Fix auditioning bug.
Diffstat (limited to 'plugingui/drumkittab.cc')
-rw-r--r--plugingui/drumkittab.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugingui/drumkittab.cc b/plugingui/drumkittab.cc
index 90f6d67..6f5cd54 100644
--- a/plugingui/drumkittab.cc
+++ b/plugingui/drumkittab.cc
@@ -179,11 +179,12 @@ void DrumkitTab::triggerAudition(int x, int y)
auto index = pos_to_colour_index(x, y);
if (index == -1) { return; }
- ++settings.audition_counter;
- settings.audition_instrument = to_instrument_name[index];
- settings.audition_velocity = current_velocity;
-
- redraw();
+ auto const& instrument = to_instrument_name[index];
+ if (!instrument.empty()) {
+ ++settings.audition_counter;
+ settings.audition_instrument = instrument;
+ settings.audition_velocity = current_velocity;
+ }
}
void DrumkitTab::highlightInstrument(int index)