summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-11-13 17:13:11 +0100
committerGitHub <noreply@github.com>2017-11-13 17:13:11 +0100
commit390e957ba4bbe1683915a5de21f9082f84f3ebe0 (patch)
treeee5b702f0b2026cc132f049b540d1d1d60454143 /editor
parentab0f7717e71efef3f09faedf66ad5ad38fefe99f (diff)
parent6496b53549aca7b1be57c3be55815f32a4842201 (diff)
Merge pull request #12893 from Chaosus/dupsignals
Duplicate signals fixes
Diffstat (limited to 'editor')
-rw-r--r--editor/scene_tree_dock.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 6b008838e5..7ada335007 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -860,6 +860,14 @@ Node *SceneTreeDock::_duplicate(Node *p_node, Map<Node *, Node *> &duplimap) {
node->set(name, value);
}
+ List<Connection> conns;
+ p_node->get_all_signal_connections(&conns);
+ for (List<Connection>::Element *E = conns.front(); E; E = E->next()) {
+ if (E->get().flags & CONNECT_PERSIST) {
+ node->connect(E->get().signal, E->get().target, E->get().method, E->get().binds, E->get().flags);
+ }
+ }
+
List<Node::GroupInfo> group_info;
p_node->get_groups(&group_info);
for (List<Node::GroupInfo>::Element *E = group_info.front(); E; E = E->next()) {