Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for MacOS Layout Geometry Restore #435

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

aa5sh
Copy link

@aa5sh aa5sh commented Jul 31, 2024

For MacOS the restore of the window geometry needs to occur after the window is shown.

For MacOS the restore of the window geometry needs to occur after the window is shown.
@foldynl
Copy link
Owner

foldynl commented Aug 1, 2024

setLayoutGeometry is called in MainWindow.cpp. Why do you add this extra call for MacOS?

@aa5sh
Copy link
Author

aa5sh commented Aug 1, 2024

For MacOS it wasn't restoring the geometry. From what I read it needed to be done after the form is displayed (w.show();) I noticed it wasn't restoring but if I would click on the menu and click on my layout that was checked it would correct. After I added the call after w.show(); it restores fine when the app is launched. Just another one of the quirky things on the Mac I believe. I think it is caused by Mac drawing the form virtually in MainWindow.cpp so when the setLayoutGeometry is called within it the form really isn't visible so it cannot restore it properly.

@foldynl
Copy link
Owner

foldynl commented Aug 1, 2024

OK. I have to trust you. QT is quite strange in some cases. Maybe this is one of those cases. It's just that for MacOS it gets called twice, so it seemed strange to me.

@foldynl
Copy link
Owner

foldynl commented Aug 2, 2024

PR Accepted

@foldynl foldynl merged commit f1140f1 into foldynl:master Aug 29, 2024
4 checks passed
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.

2 participants