Removed was-open check for ComboBox to fix freeze on macOS#6178
Merged
ssheorey merged 2 commits intoisl-org:masterfrom Oct 6, 2023
Merged
Removed was-open check for ComboBox to fix freeze on macOS#6178ssheorey merged 2 commits intoisl-org:masterfrom
ssheorey merged 2 commits intoisl-org:masterfrom
Conversation
|
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
4 tasks
errissa
approved these changes
Oct 6, 2023
Collaborator
errissa
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @cansik)
Member
|
Thanks @cansik ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As already described in #6024, on macOS the combobox was freezing when it was opened.
Motivation and Context
At the moment it is not possible to select an item from a Combobox on macOS. This does not work in the Open3D App and also any other app using the Open3D GUI library.
Checklist:
python util/check_style.py --applyto apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
It seems that the problem is the following: On macOS the ImGUI method
ImGui::IsPopupOpenalways returnsfalseand so does leads to a return of ofWidget::DrawResult::REDRAWwhich causes the GUI to redraw itself, which will go on for ever.To be honest, I am not quite sure why this check is done, maybe to change to combobox content if it has been changed while the user has the dropdown open (@errissa)?
Since it worked in version
0.15.0I first thought it is an ImGUI problem, but the ImGUI version did not change from 0.15.0 to 0.16.0. And even with a more recent version (v1.88) it does not work. Because this bug has a big impact to any GUI (you can not even fully use the open3d app on macOS), I decided to fix it directly in Open3d. Maybe it makes sense to open an issue at ImGUI so that it will be fixed in a future release.To fix the issue in Open3D, I have removed this check and simplified to redrawing to just redraw, when the selection has changed.
This change is