Prevent users from moving instanced children

This commit is contained in:
Matthias Hoelzl 2017-12-14 17:49:02 +01:00
parent b872439eef
commit ce24b149d3

View file

@ -774,9 +774,11 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
Node *n = get_node(np);
if (n) {
selected.push_back(n);
icons.push_back(next->get_icon(0));
// Only allow selection if not part of an instanced scene.
if (!n->get_owner() || n->get_owner() == get_scene_node() || n->get_owner()->get_filename() == String()) {
selected.push_back(n);
icons.push_back(next->get_icon(0));
}
}
next = tree->get_next_selected(next);
}