mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Use a GenericAudioProcessorEditor in the standalone wrapper if no editor is provided
This commit is contained in:
parent
1951714776
commit
c8d8201aba
1 changed files with 8 additions and 5 deletions
|
|
@ -730,7 +730,8 @@ private:
|
|||
public:
|
||||
MainContentComponent (StandaloneFilterWindow& filterWindow)
|
||||
: owner (filterWindow), notification (this),
|
||||
editor (owner.getAudioProcessor()->createEditorIfNeeded())
|
||||
editor (owner.getAudioProcessor()->hasEditor() ? owner.getAudioProcessor()->createEditorIfNeeded()
|
||||
: new GenericAudioProcessorEditor (*owner.getAudioProcessor()))
|
||||
{
|
||||
Value& inputMutedValue = owner.pluginHolder->getMuteInputValue();
|
||||
|
||||
|
|
@ -770,7 +771,8 @@ private:
|
|||
if (shouldShowNotification)
|
||||
notification.setBounds (r.removeFromTop (NotificationArea::height));
|
||||
|
||||
editor->setBounds (r);
|
||||
if (editor != nullptr)
|
||||
editor->setBounds (r);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
@ -830,9 +832,10 @@ private:
|
|||
#if JUCE_IOS || JUCE_ANDROID
|
||||
resized();
|
||||
#else
|
||||
setSize (editor->getWidth(),
|
||||
editor->getHeight()
|
||||
+ (shouldShowNotification ? NotificationArea::height : 0));
|
||||
if (editor != nullptr)
|
||||
setSize (editor->getWidth(),
|
||||
editor->getHeight()
|
||||
+ (shouldShowNotification ? NotificationArea::height : 0));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue