fix drag: set module subtree mouse_filter to IGNORE so events reach DashboardGrid

This commit is contained in:
Eric Smith 2026-05-20 14:11:32 -04:00
parent cf933dec6c
commit cd6295e26f

View file

@ -10,6 +10,8 @@ var _initialized: bool = false
func _ready() -> void: func _ready() -> void:
# Don't intercept mouse events — DashboardGrid handles drag-and-drop
_set_mouse_ignore(self)
if not _initialized: if not _initialized:
_initialize() _initialize()
@ -30,3 +32,10 @@ func _initialize() -> void:
_initialized = true _initialized = true
initialize() initialize()
module_ready.emit() module_ready.emit()
func _set_mouse_ignore(node: Node) -> void:
if node is Control:
node.mouse_filter = Control.MOUSE_FILTER_IGNORE
for child in node.get_children():
_set_mouse_ignore(child)