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 ScriptEditorContextMenuHandler
static func register_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 deactivated
static func unregister_context_menu() -> void:
ScriptEditorContextMenuHandler.dispose()
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