JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

[Bug]: SetSize not calling resized() Of nested components

Open francescopellegrni opened this issue 11 months ago • 0 comments

Detailed steps on how to reproduce the bug

Hello Everyone! I had the following problem:

A button with set Default Resolution, and then a function called by the button within the pluginEditor with setSize(x,y).

The resized() function of the nested component is called before the editor get actually resized, infact the function getTopLevelComponent()->getHeight() returns the “old” resolution (the numbers in pixels before the editor get resized to y instead of returning y). Forcing the resize manually after setSize solves the issue. But in JUCE 7 this line was not needed.

Am I doing something wrong?

Thanks

What is the expected behaviour?

resized() of nested component called after the editor get actually the new width and height

Operating systems

macOS

What versions of the operating systems?

Juce 8.0.4 / Xcode 16 / Sequoia

Architectures

x86_64, Arm64/aarch64

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

I have not tested against the develop branch

Code of Conduct

  • [X] I agree to follow the Code of Conduct

francescopellegrni avatar Nov 27 '24 18:11 francescopellegrni