Skip to content

SG-40840 - Toolbar option disappearing#1072

Open
chenlj1 wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
chenlj1:toolbar_option_disappearing
Open

SG-40840 - Toolbar option disappearing#1072
chenlj1 wants to merge 2 commits intoAcademySoftwareFoundation:mainfrom
chenlj1:toolbar_option_disappearing

Conversation

@chenlj1
Copy link
Contributor

@chenlj1 chenlj1 commented Jan 19, 2026

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:

  1. Pressing F10 opens the annotation tool without the toolbar disappearing
  2. Pressing F10 when annotation tool is closed reopens the tool correctly (no double-click needed)
  3. Opening via Tools→Annotation no longer causes toolbar to disappear"

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.

1 participant