diff options
author | sanikoyes <sanikoyes@163.com> | 2014-03-11 13:38:30 +0800 |
---|---|---|
committer | sanikoyes <sanikoyes@163.com> | 2014-03-11 13:38:30 +0800 |
commit | 87fd1532159c18efc06524f2715ed74b3e32ddee (patch) | |
tree | 4481bfd74f867b7c9ed8e9ccb5b3dc5442c62f3a /tools/editor | |
parent | cde48d0c9c16867edbb4fc4e3c186933564b6da0 (diff) |
fixed editor NodePath property
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/editor_node.h | 2 | ||||
-rw-r--r-- | tools/editor/scene_tree_editor.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 87f17247c3..e35467e788 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -410,6 +410,8 @@ public: static void add_editor_plugin(EditorPlugin *p_editor); static void remove_editor_plugin(EditorPlugin *p_editor); + static EditorNode * get_singleton() { return singleton; } + void edit_node(Node *p_node); void edit_resource(const Ref<Resource>& p_resource); diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index 89b7e54195..1d2c864c99 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -706,7 +706,8 @@ void SceneTreeDialog::_cancel() { void SceneTreeDialog::_select() { if (tree->get_selected()) { - emit_signal("selected",tree->get_selected()->get_path()); + Node *scene = EditorNode::get_singleton()->get_edited_scene(); + emit_signal("selected","/root/" + scene->get_parent()->get_path_to(tree->get_selected())); hide(); } } |