diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp index 7db87b2858..30249c0a53 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp @@ -146,10 +146,20 @@ void AudioProcessorEditor::attachResizableCornerComponent() void AudioProcessorEditor::setBoundsConstrained (Rectangle newBounds) { - if (constrainer != nullptr) - constrainer->setBoundsForComponent (this, newBounds, false, false, false, false); - else + if (constrainer == nullptr) + { setBounds (newBounds); + return; + } + + auto currentBounds = getBounds(); + + constrainer->setBoundsForComponent (this, + newBounds, + newBounds.getY() != currentBounds.getY() && newBounds.getBottom() == currentBounds.getBottom(), + newBounds.getX() != currentBounds.getX() && newBounds.getRight() == currentBounds.getRight(), + newBounds.getY() == currentBounds.getY() && newBounds.getBottom() != currentBounds.getBottom(), + newBounds.getX() == currentBounds.getX() && newBounds.getRight() != currentBounds.getRight()); } void AudioProcessorEditor::editorResized (bool wasResized)