diff options
author | marynate <mary.w.nate@gmail.com> | 2014-05-09 00:19:23 +0800 |
---|---|---|
committer | marynate <mary.w.nate@gmail.com> | 2014-05-09 00:20:46 +0800 |
commit | 98fcb4fa7ae5d31563ae1d14b466695db6711b67 (patch) | |
tree | 089972bb28c01631377667706f3bad796effdcc5 | |
parent | 9f01f9aa952509a0453ed24474cbe66eefbb08a4 (diff) |
Make visibility icon always last to display in scene tree
-rw-r--r-- | tools/editor/scene_tree_editor.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index 6645a3695e..4d0ed3e1dd 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -172,15 +172,6 @@ void SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) { if (p_node->is_type("CanvasItem")) { - bool h = p_node->call("is_hidden"); - if (h) - item->add_button(0,get_icon("Hidden","EditorIcons"),BUTTON_VISIBILITY); - else - item->add_button(0,get_icon("Visible","EditorIcons"),BUTTON_VISIBILITY); - - if (!p_node->is_connected("visibility_changed",this,"_node_visibility_changed")) - p_node->connect("visibility_changed",this,"_node_visibility_changed",varray(p_node)); - bool is_locked = p_node->has_meta("_edit_lock_");//_edit_group_ if (is_locked) item->add_button(0,get_icon("Lock", "EditorIcons"), BUTTON_LOCK); @@ -189,11 +180,17 @@ void SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) { if (is_grouped) item->add_button(0,get_icon("Group", "EditorIcons"), BUTTON_GROUP); + bool h = p_node->call("is_hidden"); + if (h) + item->add_button(0,get_icon("Hidden","EditorIcons"),BUTTON_VISIBILITY); + else + item->add_button(0,get_icon("Visible","EditorIcons"),BUTTON_VISIBILITY); + if (!p_node->is_connected("visibility_changed",this,"_node_visibility_changed")) + p_node->connect("visibility_changed",this,"_node_visibility_changed",varray(p_node)); } else if (p_node->is_type("GeometryInstance")) { - bool h = !p_node->call("get_flag",VS::INSTANCE_FLAG_VISIBLE); if (h) item->add_button(0,get_icon("Hidden","EditorIcons"),BUTTON_VISIBILITY); |