summaryrefslogtreecommitdiff
path: root/editor/scene_tree_editor.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-16 00:38:52 +0100
committerGitHub <noreply@github.com>2017-12-16 00:38:52 +0100
commitf73f10dd7e250576d015987830d2718adbbdbcdc (patch)
tree084263e4e166850277265fb30294211ce1f6d559 /editor/scene_tree_editor.cpp
parentdcdf9008ae39222ca983a38ebecab3b1fb5834f5 (diff)
parentce24b149d3c0c1088b9e2921d4da474ba6ba1091 (diff)
Merge pull request #14652 from hoelzl/pr-moved-instanced-children
Prevent users from moving instanced children
Diffstat (limited to 'editor/scene_tree_editor.cpp')
-rw-r--r--editor/scene_tree_editor.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 3e503c45a5..827e8d9ee4 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -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);
}