From 70024eae192afeb3654009d3d6341f88ae73a4ab Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 9 Jul 2012 13:46:08 +0100 Subject: [PATCH] Fix for RTAS compile error. --- .../RTAS/juce_RTAS_Wrapper.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp b/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp index c67a93e75a..f498ffc6ff 100644 --- a/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/RTAS/juce_RTAS_Wrapper.cpp @@ -353,7 +353,7 @@ public: ~EditorCompWrapper() { - removeChildComponent (editorComp); + removeChildComponent (getEditor()); #if JUCE_WINDOWS && ! JucePlugin_EditorRequiresKeyboardFocus Desktop::getInstance().removeFocusChangeListener (this); @@ -364,16 +364,14 @@ public: #endif } - void paint (Graphics&) - { - } + void paint (Graphics&) {} void resized() { - juce::Component* const c = getChildComponent (0); + juce::Component* const ed = getEditor(); - if (c != nullptr) - c->setBounds (0, 0, getWidth(), getHeight()); + if (ed != nullptr) + ed->setBounds (getLocalBounds()); repaint(); } @@ -399,9 +397,7 @@ public: owner->updateSize(); } - void userTriedToCloseWindow() - { - } + void userTriedToCloseWindow() {} #if JUCE_MAC && JucePlugin_EditorRequiresKeyboardFocus bool keyPressed (const KeyPress& kp) @@ -419,6 +415,8 @@ public: JuceCustomUIView* const owner; int titleW, titleH; + Component* getEditor() const { return getChildComponent (0); } + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EditorCompWrapper); }; };