From d3883551cf0c9e68ec0b8fc07e5251e0a8c4de28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 10 Dec 2024 10:09:58 +0100 Subject: [PATCH] Revert "Avoid duplicating signals from scene instances into packed scenes" This partially reverts commit 8a42e3d3eff8f8ef44d663cbe735c2bb05170cba. Comment improvements and the test case were kept, with one part commented out. --- core/object/object.h | 2 +- scene/resources/packed_scene.cpp | 6 ------ tests/scene/test_packed_scene.h | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/object/object.h b/core/object/object.h index da8e8d1b86ee..11b94a7fbf0a 100644 --- a/core/object/object.h +++ b/core/object/object.h @@ -572,7 +572,7 @@ class Object { CONNECT_PERSIST = 2, // hint for scene to save this connection CONNECT_ONE_SHOT = 4, CONNECT_REFERENCE_COUNTED = 8, - CONNECT_INHERITED = 16, // Whether or not the connection is in an instance of a scene. + CONNECT_INHERITED = 16, // Used in editor builds. }; struct Connection { diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 8b1cbdf488a5..d6748ed2e64f 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -1060,12 +1060,6 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, HashMapget_connection_count(), 3); } + /* + // FIXME: This subcase requires GH-48064 to be fixed. SUBCASE("Signals that should not be saved") { int subscene_flags = Object::CONNECT_PERSIST | Object::CONNECT_INHERITED; // subscene node to itself @@ -115,6 +117,7 @@ TEST_CASE("[PackedScene] Signals Preserved when Packing Scene") { Ref state = packed_scene->get_state(); CHECK_EQ(state->get_connection_count(), 0); } + */ memdelete(main_scene_root); }