Merge pull request #14652 from hoelzl/pr-moved-instanced-children
Prevent users from moving instanced children
This commit is contained in:
commit
f73f10dd7e
@ -774,9 +774,11 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
|
|||||||
|
|
||||||
Node *n = get_node(np);
|
Node *n = get_node(np);
|
||||||
if (n) {
|
if (n) {
|
||||||
|
// Only allow selection if not part of an instanced scene.
|
||||||
selected.push_back(n);
|
if (!n->get_owner() || n->get_owner() == get_scene_node() || n->get_owner()->get_filename() == String()) {
|
||||||
icons.push_back(next->get_icon(0));
|
selected.push_back(n);
|
||||||
|
icons.push_back(next->get_icon(0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
next = tree->get_next_selected(next);
|
next = tree->get_next_selected(next);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user