From 63a68ebd3f8c0118c1fec2f4d6900a0af253a2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 16 Jun 2018 17:37:15 +0200 Subject: Fix auditioning bug. --- plugingui/drumkittab.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugingui') 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) -- cgit v1.2.3