Merge pull request #95329 from Giganzo/lock-eye-icon-order-in-scene-tree

Fix order of Lock and Group icons in SceneTree
This commit is contained in:
Rémi Verschelde 2024-08-12 18:18:03 +02:00
commit 0444fb67e6
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 7 additions and 7 deletions

View File

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