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

Gui: Fix NaviCube drawing and interaction with Qt6 #14159

Merged
merged 1 commit into from
May 22, 2024

Conversation

YakoYakoYokuYoku
Copy link
Contributor

I've noticed that while debugging the NaviCube with a FreeCAD Qt6 build OpenGL errors are produced when picking faces or buttons. It turns out that these errors are produced because the underlying framebuffer object has a different context than the one that was created with, more specifically, QtWebEngine changes it before the mouse event is processed. I've fixed this by setting making the proper context current explicitly at the 3D Inventor viewer when Navicube has to process the event. Please test this and give your comments before merging. Fixes #13494.

@github-actions github-actions bot added the Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label May 20, 2024
@Rexbas
Copy link
Contributor

Rexbas commented May 20, 2024

Nice, works perfect with both Qt5 and Qt6.

@YakoYakoYokuYoku
Copy link
Contributor Author

@Rexbas, please try this version, as this will only make the context current at the proper time.

CC @adrianinsaval

@Rexbas
Copy link
Contributor

Rexbas commented May 22, 2024

Still works perfect!

@adrianinsaval
Copy link
Member

Awesome, thanks for this!

@adrianinsaval adrianinsaval merged commit ccaee18 into FreeCAD:main May 22, 2024
9 checks passed
@adrianinsaval adrianinsaval added the Backport todo PR that should be backported to stable branch label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport todo PR that should be backported to stable branch Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation cube seems to get wrong mouse coordinates when built with qt6
3 participants