aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/scene_tree_editor.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2016-01-16 22:41:10 -0300
committerJuan Linietsky2016-01-16 22:41:10 -0300
commit72fcb8a35beab251d01864bc67da3e3a8e75aed6 (patch)
tree9ad5837e4237d1071a9e1a5b40efdaffa3f89f33 /tools/editor/scene_tree_editor.cpp
parent40818299231fe1854635ffe36d8b9565f430b35f (diff)
downloadgodot-72fcb8a35beab251d01864bc67da3e3a8e75aed6.tar.gz
godot-72fcb8a35beab251d01864bc67da3e3a8e75aed6.tar.zst
godot-72fcb8a35beab251d01864bc67da3e3a8e75aed6.zip
-Moved all the "root" input handling for GUI from individual Controls to Viewport.
-Should fix several reported bugs when controls don't have a common parent This may have added new bugs, so please report if so!
Diffstat (limited to 'tools/editor/scene_tree_editor.cpp')
-rw-r--r--tools/editor/scene_tree_editor.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index 531fe83bc..ea7d76013 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -39,12 +39,8 @@
Node *SceneTreeEditor::get_scene_node() {
ERR_FAIL_COND_V(!is_inside_tree(),NULL);
- if (get_tree()->get_root()->get_child_count() && get_tree()->get_root()->get_child(0)->cast_to<EditorNode>())
- return get_tree()->get_root()->get_child(0)->cast_to<EditorNode>()->get_edited_scene();
- else
- return get_tree()->get_root();
- return NULL;
+ return get_tree()->get_edited_scene_root();
}