AudioProcessorEditor::setResizable() broken with custom constrainer


#1

Hello,

We’ve noticed that calling AudioProcessorEditor::setResizable(false, false); after setting a custom constrainer with setConstrainer() does not set resizable to false. It instead overwrites our custom constrainer with the default constrainer, and isResizable() returns true.

AudioProcessorEditor::setConstrainer(this);
setResizable(false, false);
jassert(!isResizable()); // this assert fails even though we just set resizable to false

This is causing problems in our plugins because some DAWs use isResizable() to determine if dragging the corner should resize the UI. For example, FL Studio allows dragging the corner on our VST3 plugins even though we don’t support that.

Thanks for your help!


#2

#3

This is working well, thanks for the fix!


#4

I gotta ask. the Constrainer is meant for if you need to limit the window’s ability to be resized and maintain the aspect ratio if you do enable resizing. If you’re making your window not resizable, why are you even applying a constrainer?


#5

It can also be used for restricting a window’s position on the screen.


#6

sure. so, why would you try to do this with plugins, since the host controls the GUI window? am I missing something?


#7

We were using it at the time to maintain a fixed aspect ratio where we were only allowing the plugin to be resized in some situations (hence we were toggling setResizable, which overwrote our custom constrainer). Not the most important thing in the world, but seemed unintended, so we reported it.