From eb96b7b85049bd047d26aa5b7177f82b2ed05b58 Mon Sep 17 00:00:00 2001 From: Giganzo <158825920+Giganzo@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:06:55 +0200 Subject: [PATCH] Fix order of Lock and Group icons in SceneTree --- editor/gui/scene_tree_editor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/editor/gui/scene_tree_editor.cpp b/editor/gui/scene_tree_editor.cpp index a3e62c298f7..c6cc0e97dde 100644 --- a/editor/gui/scene_tree_editor.cpp +++ b/editor/gui/scene_tree_editor.cpp @@ -398,6 +398,13 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { item->set_button_color(0, item->get_button_count(0) - 1, button_color); } + if (p_node->has_meta("_edit_lock_")) { + item->add_button(0, get_editor_theme_icon(SNAME("Lock")), BUTTON_LOCK, false, TTR("Node is locked.\nClick to unlock it.")); + } + if (p_node->has_meta("_edit_group_")) { + item->add_button(0, get_editor_theme_icon(SNAME("Group")), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make them selectable.")); + } + if (p_node->has_method("is_visible") && p_node->has_method("set_visible") && p_node->has_signal(SceneStringName(visibility_changed))) { bool is_visible = p_node->call("is_visible"); if (is_visible) { @@ -412,13 +419,6 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) { _update_visibility_color(p_node, item); } - if (p_node->has_meta("_edit_lock_")) { - item->add_button(0, get_editor_theme_icon(SNAME("Lock")), BUTTON_LOCK, false, TTR("Node is locked.\nClick to unlock it.")); - } - if (p_node->has_meta("_edit_group_")) { - item->add_button(0, get_editor_theme_icon(SNAME("Group")), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make them selectable.")); - } - if (p_node->is_class("AnimationMixer")) { bool is_pinned = AnimationPlayerEditor::get_singleton()->get_editing_node() == p_node && AnimationPlayerEditor::get_singleton()->is_pinned();