Skip to content

GD-1071: Fix context menu shortcuts broken after settings dialog change#1081

Merged
MikeSchulze merged 2 commits intomasterfrom
GD-1071
Mar 18, 2026
Merged

GD-1071: Fix context menu shortcuts broken after settings dialog change#1081
MikeSchulze merged 2 commits intomasterfrom
GD-1071

Conversation

@MikeSchulze
Copy link
Copy Markdown
Collaborator

Why

Shortcuts registered in _init() captured the shortcut object at plugin load time. Changes made via the GdUnit settings dialog were not reflected, leaving the context menus broken or using stale keybindings.

What

  • Move add_menu_shortcut() from _init() into _popup_menu(), so shortcuts are resolved fresh on every popup
  • Filter selected paths to test suites only in the file system handler before building the menu; skip extending the menu if none qualify
  • Guard GdUnitThreadContext.terminate() against a null execution context to prevent a crash if called after dispose()

# Why
Shortcuts registered in `_init()` captured the shortcut object at plugin load time. Changes made via the GdUnit settings dialog were not
reflected, leaving the context menus broken or using stale keybindings.

# What
- Move `add_menu_shortcut()` from `_init()` into `_popup_menu()`, so shortcuts are resolved fresh on every popup
- Filter selected paths to test suites only in the file system handler before building the menu; skip extending the menu if none qualify
- Guard `GdUnitThreadContext.terminate()` against a null execution context to prevent a crash if called after `dispose()`
@MikeSchulze MikeSchulze self-assigned this Mar 18, 2026
@MikeSchulze MikeSchulze added the bug Something isn't working label Mar 18, 2026
@MikeSchulze MikeSchulze linked an issue Mar 18, 2026 that may be closed by this pull request
@MikeSchulze MikeSchulze merged commit 3f1473f into master Mar 18, 2026
15 checks passed
@MikeSchulze MikeSchulze deleted the GD-1071 branch March 18, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GD-1071: Cannot run tests after changing GdUnit settings

1 participant