diff --git a/game/addons/mesh_data_resource_editor/uv_editor/UVEditorPopup.gd b/game/addons/mesh_data_resource_editor/uv_editor/UVEditorPopup.gd index 8b0d529c..32a9795a 100644 --- a/game/addons/mesh_data_resource_editor/uv_editor/UVEditorPopup.gd +++ b/game/addons/mesh_data_resource_editor/uv_editor/UVEditorPopup.gd @@ -2,8 +2,11 @@ tool extends ConfirmationDialog func _enter_tree(): - connect("confirmed", self, "on_ok_pressed") - get_cancel().connect("pressed", self, "on_cancel_pressed") + if !is_connected("confirmed", self, "on_ok_pressed"): + connect("confirmed", self, "on_ok_pressed") + + if !get_cancel().is_connected("pressed", self, "on_cancel_pressed"): + get_cancel().connect("pressed", self, "on_cancel_pressed") func on_ok_pressed() -> void: $UVEditor.ok_pressed()