SG-40840 - Toolbar option disappearing#1072
Open
chenlj1 wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
Open
SG-40840 - Toolbar option disappearing#1072chenlj1 wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
chenlj1 wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
Conversation
Signed-off-by: chenl1 <ling.jie.chen@autodesk.com>
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.
SG-40840: [RV] Top toolbar options disappear after opening Annotation panel for the first time during the session
Summarize your change.
Changed the annotation window to be a Qt.Widget instead of a Qt.Tool and added m.update() and m.activateWindow() calls to force the main window to refresh and retain focus. Also added a guard in the code to check if we are already in the process of activating to prevent recursive call of the activate() function.
Describe the reason for the change.
Previously, when opening the annotation tool for the first time while it being undocked by pressing f10 and when reopening the annotation tool by going into Tools->Annotation in the tool bar caused the top tool bar options to disappear due to a loss of focus on the main RV window. This change forces the window to regain focus preventing the toolbar from disappearing.
The addition of the guard was to prevent the annotation tool from having unexpected behaviour when trying to reactivate it. i.e. we needed two clicks of F10 instead of one because activate() calling updateDrawModeUI() would trigger another toggle(), causing unintended deactivation.
Describe what you have tested and on which operating system.
This fix was tested on macOS (issue only affected macOS).
Verified that: