Browse Source

Use a GenericAudioProcessorEditor in the standalone wrapper if no editor is provided

tags/2021-05-28
ed 6 years ago
parent
commit
c8d8201aba
1 changed files with 8 additions and 5 deletions
  1. +8
    -5
      modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h

+ 8
- 5
modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h View File

@@ -730,7 +730,8 @@ private:
public: public:
MainContentComponent (StandaloneFilterWindow& filterWindow) MainContentComponent (StandaloneFilterWindow& filterWindow)
: owner (filterWindow), notification (this), : owner (filterWindow), notification (this),
editor (owner.getAudioProcessor()->createEditorIfNeeded())
editor (owner.getAudioProcessor()->hasEditor() ? owner.getAudioProcessor()->createEditorIfNeeded()
: new GenericAudioProcessorEditor (*owner.getAudioProcessor()))
{ {
Value& inputMutedValue = owner.pluginHolder->getMuteInputValue(); Value& inputMutedValue = owner.pluginHolder->getMuteInputValue();
@@ -770,7 +771,8 @@ private:
if (shouldShowNotification) if (shouldShowNotification)
notification.setBounds (r.removeFromTop (NotificationArea::height)); notification.setBounds (r.removeFromTop (NotificationArea::height));
editor->setBounds (r);
if (editor != nullptr)
editor->setBounds (r);
} }
private: private:
@@ -830,9 +832,10 @@ private:
#if JUCE_IOS || JUCE_ANDROID #if JUCE_IOS || JUCE_ANDROID
resized(); resized();
#else #else
setSize (editor->getWidth(),
editor->getHeight()
+ (shouldShowNotification ? NotificationArea::height : 0));
if (editor != nullptr)
setSize (editor->getWidth(),
editor->getHeight()
+ (shouldShowNotification ? NotificationArea::height : 0));
#endif #endif
} }


Loading…
Cancel
Save