mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
VST3 Client: Disallow creating a new editor if one editor is already active
This commit is contained in:
parent
3afaaa48be
commit
e0306d25d4
1 changed files with 6 additions and 4 deletions
|
|
@ -927,11 +927,13 @@ public:
|
|||
{
|
||||
if (auto* pluginInstance = getPluginInstance())
|
||||
{
|
||||
if (pluginInstance->hasEditor() && name != nullptr
|
||||
&& strcmp (name, Vst::ViewType::kEditor) == 0)
|
||||
{
|
||||
const auto mayCreateEditor = pluginInstance->hasEditor()
|
||||
&& name != nullptr
|
||||
&& std::strcmp (name, Vst::ViewType::kEditor) == 0
|
||||
&& pluginInstance->getActiveEditor() == nullptr;
|
||||
|
||||
if (mayCreateEditor)
|
||||
return new JuceVST3Editor (*this, *pluginInstance);
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue