Repository: godotengine/godot
File: editor/scene_tree_editor.cpp (C++)

Code before:
			type = p_node->get_class();
		}

		String tooltip = String(p_node->get_name()) + "\n" + TTR("Type:") + " " + type;
		if (!p_node->get_editor_description().is_empty()) {
			tooltip += "\n\n" + p_node->get_editor_description();
		}

		item->set_tooltip(0, tooltip);
	}

	if (can_open_instance && undo_redo) { //Show buttons only when necessary(SceneTreeDock) to avoid crashes

		if (!p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
			p_node->connect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed).bind(p_node));
		}

		Ref<Script> script = p_node->get_script();
		if (!script.is_null()) {
			item->add_button(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), BUTTON_SCRIPT, false, TTR("Open Script:") + " " + script->get_path());
			if (EditorNode::get_singleton()->get_object_custom_type_base(p_node) == script) {
				item->set_button_color(0, item->get_button_count(0) - 1, Color(1, 1, 1, 0.5));
			}
		}

		if (p_node->is_class("CanvasItem")) {
			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."));
			}

			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."));
			}

			bool v = p_node->call("is_visible");
			if (v) {
				item->add_button(0, get_theme_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons")), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
			} else {
				item->add_button(0, get_theme_icon(SNAME("GuiVisibilityHidden"), SNAME("EditorIcons")), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
			}

			if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
				p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed).bind(p_node));
			}

			_update_visibility_color(p_node, item);
		} else if (p_node->is_class("CanvasLayer")) {
			bool v = p_node->call("is_visible");
			if (v) {
				item->add_button(0, get_theme_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons")), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
			} else {

Review comment (suggestion):
```suggestion
				item->add_button(0, get_theme_icon(SNAME("Group"), SNAME("EditorIcons")), BUTTON_GROUP, false, TTR("Children are not selectable.\nClick to make them selectable."));
```

Code after:
			type = p_node->get_class();
		}

		String tooltip = String(p_node->get_name()) + "\n" + TTR("Type:") + " " + type;
		if (!p_node->get_editor_description().is_empty()) {
			tooltip += "\n\n" + p_node->get_editor_description();
		}

		item->set_tooltip(0, tooltip);
	}

	if (can_open_instance && undo_redo) { //Show buttons only when necessary(SceneTreeDock) to avoid crashes

		if (!p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
			p_node->connect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed).bind(p_node));
		}

		Ref<Script> script = p_node->get_script();
		if (!script.is_null()) {
			item->add_button(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons")), BUTTON_SCRIPT, false, TTR("Open Script:") + " " + script->get_path());
			if (EditorNode::get_singleton()->get_object_custom_type_base(p_node) == script) {
				item->set_button_color(0, item->get_button_count(0) - 1, Color(1, 1, 1, 0.5));
			}
		}

		if (p_node->is_class("CanvasItem")) {
			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."));
			}

			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 them selectable."));
			}

			bool v = p_node->call("is_visible");
			if (v) {
				item->add_button(0, get_theme_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons")), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
			} else {
				item->add_button(0, get_theme_icon(SNAME("GuiVisibilityHidden"), SNAME("EditorIcons")), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
			}

			if (!p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
				p_node->connect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed).bind(p_node));
			}

			_update_visibility_color(p_node, item);
		} else if (p_node->is_class("CanvasLayer")) {
			bool v = p_node->call("is_visible");
			if (v) {
				item->add_button(0, get_theme_icon(SNAME("GuiVisibilityVisible"), SNAME("EditorIcons")), BUTTON_VISIBILITY, false, TTR("Toggle Visibility"));
			} else {