summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-18 12:05:54 +0100
committerGitHub <noreply@github.com>2021-02-18 12:05:54 +0100
commitbdf3c578ff1d382ccf0c6bd2cde1abf5393fda53 (patch)
treee79206fe9301c484fa54600937b213edad6f9737 /editor
parent8870f43d742e0c48ae543d999856f5989170b62d (diff)
parent6146d95a9d181ad6d06d7209c85768d4c6e60524 (diff)
Merge pull request #45950 from KoBeWi/naughty_resources
Fix internal resource detecting when pasting nodes
Diffstat (limited to 'editor')
-rw-r--r--editor/scene_tree_dock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index c1edeeeb0e..0ba67d05dd 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -2921,7 +2921,7 @@ void SceneTreeDock::_create_remap_for_node(Node *p_node, Map<RES, RES> &r_remap)
if (v.is_ref()) {
RES res = v;
if (res.is_valid()) {
- if (res->get_path() == "" && !r_remap.has(res)) {
+ if ((res->get_path() == "" || res->get_path().find("::") > -1) && !r_remap.has(res)) {
_create_remap_for_resource(res, r_remap);
}
}
@@ -2948,7 +2948,7 @@ void SceneTreeDock::_create_remap_for_resource(RES p_resource, Map<RES, RES> &r_
if (v.is_ref()) {
RES res = v;
if (res.is_valid()) {
- if (res->get_path() == "" && !r_remap.has(res)) {
+ if ((res->get_path() == "" || res->get_path().find("::") > -1) && !r_remap.has(res)) {
_create_remap_for_resource(res, r_remap);
}
}