summaryrefslogtreecommitdiff
path: root/editor/scene_tree_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/scene_tree_editor.cpp')
-rw-r--r--editor/scene_tree_editor.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 2f5a4ba04c..b588c01bce 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -355,13 +355,11 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll
}
if (p_node->is_class("CanvasItem")) {
- bool is_locked = p_node->has_meta("_edit_lock_"); //_edit_group_
- if (is_locked) {
+ if (p_node->has_meta("_edit_lock_")) {
item->add_button(0, get_theme_icon(SNAME("Lock"), SNAME("EditorIcons")), BUTTON_LOCK, false, TTR("Node is locked.\nClick to unlock it."));
}
- bool is_grouped = p_node->has_meta("_edit_group_");
- if (is_grouped) {
+ if (p_node->has_meta("_edit_group_")) {
item->add_button(0, get_theme_icon(SNAME("Group"), SNAME("EditorIcons")), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make selectable."));
}
@@ -389,13 +387,11 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll
p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed), varray(p_node));
}
} else if (p_node->is_class("Node3D")) {
- bool is_locked = p_node->has_meta("_edit_lock_");
- if (is_locked) {
+ if (p_node->has_meta("_edit_lock_")) {
item->add_button(0, get_theme_icon(SNAME("Lock"), SNAME("EditorIcons")), BUTTON_LOCK, false, TTR("Node is locked.\nClick to unlock it."));
}
- bool is_grouped = p_node->has_meta("_edit_group_");
- if (is_grouped) {
+ if (p_node->has_meta("_edit_group_")) {
item->add_button(0, get_theme_icon(SNAME("Group"), SNAME("EditorIcons")), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make selectable."));
}