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

a few bugs #520

Merged
merged 4 commits into from
Jun 19, 2023
Merged

a few bugs #520

merged 4 commits into from
Jun 19, 2023

Conversation

7c0o
Copy link

@7c0o 7c0o commented Jun 8, 2023

Sometimes the synchronous calculation of the rectangular area fails

Sometimes the synchronous calculation of the rectangular area fails
@githubuser0xFFFF
Copy link
Owner

Thank you for this pull request. I cannot reproduce the problem here, so maybe it is related to your application. Can you post a video that I can understand the intention of this pull request?

@7c0o
Copy link
Author

7c0o commented Jun 8, 2023

Thank you for this pull request. I cannot reproduce the problem here, so maybe it is related to your application. Can you post a video that I can understand the intention of this pull request?

You should add many tab widgets.
This problem is reproduced when the length of the tab bar exceeds the length of the QSrcollArea's viewport

@githubuser0xFFFF
Copy link
Owner

Should I test this under Windows or Linux or is it reproducible on both systems?

@7c0o
Copy link
Author

7c0o commented Jun 9, 2023

Should I test this under Windows or Linux or is it reproducible on both systems?

windows

7c0o added 2 commits June 14, 2023 09:42
saveState() may use the floatingDockContainer to be deleted
@7c0o 7c0o changed the title Update DockAreaTabBar.cpp a few bugs Jun 14, 2023
@githubuser0xFFFF
Copy link
Owner

Please describe the exact steps I need to do to reproduce the problem that you try to solve with this change:

		QTimer::singleShot(0, [&, TabWidget]{
			    _this->ensureWidgetVisible(TabWidget);
			});

If I cannot reproduce the problem here, I will not merge this change - sorry.

@7c0o
Copy link
Author

7c0o commented Jun 15, 2023

Please describe the exact steps I need to do to reproduce the problem that you try to solve with this change:

		QTimer::singleShot(0, [&, TabWidget]{
			    _this->ensureWidgetVisible(TabWidget);
			});

If I cannot reproduce the problem here, I will not merge this change - sorry.

Before modification
image
image
After modification
image

remove dock container
@githubuser0xFFFF githubuser0xFFFF merged commit 916df28 into githubuser0xFFFF:master Jun 19, 2023
1 check passed
@githubuser0xFFFF
Copy link
Owner

Thank you for your bug fixes. I was able to reproduce the problem here and merged your changes.

@sarimisar
Copy link

This fix seems to have introduced a regression when _this is deleted before the lambda slot occurred, for example deleting the DockManager (and consequently _this) immediately after the execution of updateTabs function (we encountered this problem in our software). A safer solution can be the following:

QTimer::singleShot(0, _this, [&, TabWidget]{
   _this->ensureWidgetVisible(TabWidget);
});

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.

None yet

3 participants