mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioProcessorEditor: Fixed a bug introduced in 5a59c92b causing editors to always be marked as resizable by the host when using the default ComponentBoundsConstrainer
This commit is contained in:
parent
99d122e4fb
commit
b9ae71ae8f
2 changed files with 12 additions and 3 deletions
|
|
@ -73,7 +73,7 @@ void AudioProcessorEditor::initialise()
|
|||
|
||||
// END SECTION A
|
||||
|
||||
setConstrainer (&defaultConstrainer);
|
||||
attachConstrainer (&defaultConstrainer);
|
||||
resizeListener.reset (new AudioProcessorEditorListener (*this));
|
||||
addComponentListener (resizeListener.get());
|
||||
}
|
||||
|
|
@ -124,8 +124,7 @@ void AudioProcessorEditor::setConstrainer (ComponentBoundsConstrainer* newConstr
|
|||
{
|
||||
if (constrainer != newConstrainer)
|
||||
{
|
||||
constrainer = newConstrainer;
|
||||
updatePeer();
|
||||
attachConstrainer (newConstrainer);
|
||||
|
||||
if (constrainer != nullptr)
|
||||
resizableByHost = (newConstrainer->getMinimumWidth() != newConstrainer->getMaximumWidth()
|
||||
|
|
@ -136,6 +135,15 @@ void AudioProcessorEditor::setConstrainer (ComponentBoundsConstrainer* newConstr
|
|||
}
|
||||
}
|
||||
|
||||
void AudioProcessorEditor::attachConstrainer (ComponentBoundsConstrainer* newConstrainer)
|
||||
{
|
||||
if (constrainer != newConstrainer)
|
||||
{
|
||||
constrainer = newConstrainer;
|
||||
updatePeer();
|
||||
}
|
||||
}
|
||||
|
||||
void AudioProcessorEditor::attachResizableCornerComponent()
|
||||
{
|
||||
resizableCorner = std::make_unique<ResizableCornerComponent> (this, constrainer);
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ private:
|
|||
void initialise();
|
||||
void editorResized (bool wasResized);
|
||||
void updatePeer();
|
||||
void attachConstrainer (ComponentBoundsConstrainer*);
|
||||
void attachResizableCornerComponent();
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue