diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index aea2c9b..ae9b1af 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -518,12 +518,10 @@ void PaulstretchpluginAudioProcessorEditor::filesDropped(const StringArray & fil bool PaulstretchpluginAudioProcessorEditor::keyPressed(const KeyPress & press) { + std::function action; if (press == 'I') - { - chooseFile(); - return true; - } - return false; + action = [this]() { chooseFile(); return true; }; + return action && action(); } void PaulstretchpluginAudioProcessorEditor::chooseFile()