Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
2b29f4918a
3 changed files with 8 additions and 10 deletions
  1. +1
    -1
      extras/audio plugins/demo/src/DemoEditorComponent.h
  2. +4
    -4
      src/juce_appframework/audio/processors/juce_AudioProcessorEditor.cpp
  3. +3
    -5
      src/juce_appframework/audio/processors/juce_AudioProcessorEditor.h

+ 1
- 1
extras/audio plugins/demo/src/DemoEditorComponent.h View File

@@ -92,7 +92,7 @@ private:
// handy wrapper method to avoid having to cast the filter to a DemoJuceFilter // handy wrapper method to avoid having to cast the filter to a DemoJuceFilter
// every time we need it.. // every time we need it..
DemoJuceFilter* getFilter() const throw() { return (DemoJuceFilter*) getOwnerFilter(); }
DemoJuceFilter* getFilter() const throw() { return (DemoJuceFilter*) getAudioProcessor(); }
}; };


+ 4
- 4
src/juce_appframework/audio/processors/juce_AudioProcessorEditor.cpp View File

@@ -38,18 +38,18 @@ BEGIN_JUCE_NAMESPACE
//============================================================================== //==============================================================================
AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* const ownerFilter_)
: ownerFilter (ownerFilter_)
AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* const owner_)
: owner (owner_)
{ {
// the filter must be valid.. // the filter must be valid..
jassert (ownerFilter != 0);
jassert (owner != 0);
} }
AudioProcessorEditor::~AudioProcessorEditor() AudioProcessorEditor::~AudioProcessorEditor()
{ {
// if this fails, then the wrapper hasn't called editorBeingDeleted() on the // if this fails, then the wrapper hasn't called editorBeingDeleted() on the
// filter for some reason.. // filter for some reason..
jassert (ownerFilter->getActiveEditor() != this);
jassert (owner->getActiveEditor() != this);
} }


+ 3
- 5
src/juce_appframework/audio/processors/juce_AudioProcessorEditor.h View File

@@ -50,8 +50,6 @@ class AudioProcessorEditor : public Component
protected: protected:
//============================================================================== //==============================================================================
/** Creates an editor for the specified processor. /** Creates an editor for the specified processor.
You'll need to pass in the filter that's creating it.
*/ */
AudioProcessorEditor (AudioProcessor* const owner); AudioProcessorEditor (AudioProcessor* const owner);
@@ -61,13 +59,13 @@ public:
//============================================================================== //==============================================================================
/** Returns a pointer to the filter that owns this editor. */
AudioProcessor* getOwnerFilter() const throw() { return ownerFilter; }
/** Returns a pointer to the processor that this editor represents. */
AudioProcessor* getAudioProcessor() const throw() { return owner; }
private: private:
//============================================================================== //==============================================================================
AudioProcessor* const ownerFilter;
AudioProcessor* const owner;
}; };


Loading…
Cancel
Save