1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

-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!
This commit is contained in:
Juan Linietsky
2016-01-16 22:41:10 -03:00
parent 4081829923
commit 72fcb8a35b
10 changed files with 1156 additions and 1017 deletions

View File

@@ -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();
}