diff options
author | Chaosus <chaosus89@gmail.com> | 2017-11-13 13:54:40 +0300 |
---|---|---|
committer | Chaosus <chaosus89@gmail.com> | 2017-11-13 18:42:07 +0300 |
commit | 6496b53549aca7b1be57c3be55815f32a4842201 (patch) | |
tree | 119a93ad27623970fa0d74825e9d42c16564cca4 /editor | |
parent | 0dd96bccd3fd14c2c0380ecc6326d2a655d8d826 (diff) |
Duplicate signals fixes
Diffstat (limited to 'editor')
-rw-r--r-- | editor/scene_tree_dock.cpp | 8 |
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()) { |