You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe What
The ScriptEditorContextMenuHandler is added to the root node and removed at plugin exit and results into problems.
Instead, we should add it as child to the GdUnit inspector to be managed by this component instead of duing manually delete at plugin exit via dispose.
Dev hints
res://addons/gdUnit4/src/ui/ScriptEditorControls.gd
# Register the given context menu to the current script editor# Is called when the plugin is activated# The active script is connected to the ScriptEditorContextMenuHandlerstaticfuncregister_context_menu(menu: Array[GdUnitContextMenuItem]) ->void:
Engine.get_main_loop().root.call_deferred("add_child", ScriptEditorContextMenuHandler.new(menu))
# Unregisteres all registerend context menus and gives the ScriptEditorContextMenuHandler> free# Is called when the plugin is deactivatedstaticfuncunregister_context_menu() ->void:
ScriptEditorContextMenuHandler.dispose()
The text was updated successfully, but these errors were encountered:
MikeSchulze
changed the title
Revisit the ScriptEditorContextMenuHandler added to the root node
GD-506: Revisit the ScriptEditorContextMenuHandler added to the root node
Jun 17, 2024
…node
# Why
#506
# What
- simplify adding the `ScriptEditorContextMenuHandler`
- problematic "Dispose" functionality removed, the handler is now released via the standard godot three-node free mechanism
…node (#507)
# Why
#506
# What
- simplify adding the `ScriptEditorContextMenuHandler`
- problematic "Dispose" functionality removed, the handler is now
released via the standard Godot three-node free mechanism
Describe What
The
ScriptEditorContextMenuHandler
is added to the root node and removed at plugin exit and results into problems.Instead, we should add it as child to the GdUnit inspector to be managed by this component instead of duing manually delete at plugin exit via dispose.
Dev hints
res://addons/gdUnit4/src/ui/ScriptEditorControls.gd
The text was updated successfully, but these errors were encountered: