Bug: AudioProcessorEditor::setConstrainer() should recreate the ResizableCornerComponent

AudioProcessorEditor::setConstrainer() should recreate the ResizableCornerComponent

Example code: https://github.com/FigBug/juce_bugs/blob/master/Constrain/Source/PluginEditor.cpp

Issue 1: If you call setResizable before setConstrainer then the constrainer will be ignored by ResizableCornerComponent and it’ll have no effect.

Issue 2: If you call setResizable after setConstrainer then the ResizableCornerComponent will use the constrainer, but won’t update to the new constrainer after calling setConstrainer again, either leading to the behaviour not changing or an access to deallocated memory.

Also when you add the ResizableCornerComponent it doesn’t get positioned until the window is resized.

2 Likes