mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioPluginHost: Fix bug where internal plugins could not be created from the main menu
This commit is contained in:
parent
02eb66ee7a
commit
145d3819eb
3 changed files with 17 additions and 18 deletions
|
|
@ -894,9 +894,9 @@ void GraphEditorPanel::showPopupMenu (Point<int> mousePos)
|
|||
menu->showMenuAsync ({},
|
||||
ModalCallbackFunction::create ([this, mousePos] (int r)
|
||||
{
|
||||
if (r > 0)
|
||||
if (auto* mainWin = findParentComponentOfClass<MainHostWindow>())
|
||||
createNewPlugin (mainWin->getChosenType (r), mousePos);
|
||||
if (auto* mainWin = findParentComponentOfClass<MainHostWindow>())
|
||||
if (const auto chosen = mainWin->getChosenType (r))
|
||||
createNewPlugin (*chosen, mousePos);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue