Skip to content

Commit

Permalink
Merge pull request #45950 from KoBeWi/naughty_resources
Browse files Browse the repository at this point in the history
Fix internal resource detecting when pasting nodes
  • Loading branch information
akien-mga authored Feb 18, 2021
2 parents 8870f43 + 6146d95 commit bdf3c57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand All @@ -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);
}
}
Expand Down

0 comments on commit bdf3c57

Please sign in to comment.