Skip to content

Fix attached subwindows occasionally snapping to minimum size#8387

Open
sqrvrt wants to merge 1 commit into
LMMS:masterfrom
sqrvrt:fix/nosize
Open

Fix attached subwindows occasionally snapping to minimum size#8387
sqrvrt wants to merge 1 commit into
LMMS:masterfrom
sqrvrt:fix/nosize

Conversation

@sqrvrt
Copy link
Copy Markdown
Contributor

@sqrvrt sqrvrt commented May 14, 2026

Fixes #8292.

Presumable cause of bug:

QLayout::SetMinAndMaxSize on SubWindow layout causes it to calculate minimum and maximum sizes based on all visible children. If (child) window contents widget happens to be marked as hidden when a resize is requested, it does not get included into the layout, and as such the engine thinks there are no children and sets maximum size to 0x0. Then, whenever the child is shown again, minimum (and maximum) sizes are correct again, and window is resized from it's current size (0x0) to closest valid size (i.e. minimum size).

Now that i think about it, forcing show on resizeEvent instead of setVisible might cover more (all) cases, but this seems to be enough as it is.

@sqrvrt sqrvrt changed the title Fix attached subwindowsoccasionally snapping to minimum size Fix attached subwindows occasionally snapping to minimum size May 14, 2026
extern-stat added a commit to extern-stat/lmms that referenced this pull request May 14, 2026
@extern-stat
Copy link
Copy Markdown
Contributor

Tested this and it works great! I'm not able to replicate #8292 in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Piano roll opening with minimum height after loading project

2 participants