1
0
Fork 0

Merge pull request #97722 from dustdfg/fix_wrong_groups_tooltip

Fix tooltip message of button that opens groups/signals dock
This commit is contained in:
Thaddeus Crews 2024-11-11 14:18:13 -06:00
commit 563355637e
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84
1 changed files with 6 additions and 6 deletions

View File

@ -369,16 +369,14 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
msg_temp += String::utf8("") + String(E.name) + "\n"; msg_temp += String::utf8("") + String(E.name) + "\n";
} }
} }
} } else {
if (num_connections >= 1 || num_groups >= 1) { msg_temp += "\n";
if (num_groups < 1) {
msg_temp += "\n";
}
msg_temp += TTR("Click to show signals dock.");
} }
Ref<Texture2D> icon_temp; Ref<Texture2D> icon_temp;
SceneTreeEditorButton signal_temp = BUTTON_SIGNALS; SceneTreeEditorButton signal_temp = BUTTON_SIGNALS;
String msg_temp_end = TTR("Click to show signals dock.");
if (num_connections >= 1 && num_groups >= 1) { if (num_connections >= 1 && num_groups >= 1) {
icon_temp = get_editor_theme_icon(SNAME("SignalsAndGroups")); icon_temp = get_editor_theme_icon(SNAME("SignalsAndGroups"));
} else if (num_connections >= 1) { } else if (num_connections >= 1) {
@ -386,9 +384,11 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
} else if (num_groups >= 1) { } else if (num_groups >= 1) {
icon_temp = get_editor_theme_icon(SNAME("Groups")); icon_temp = get_editor_theme_icon(SNAME("Groups"));
signal_temp = BUTTON_GROUPS; signal_temp = BUTTON_GROUPS;
msg_temp_end = TTR("Click to show groups dock.");
} }
if (num_connections >= 1 || num_groups >= 1) { if (num_connections >= 1 || num_groups >= 1) {
msg_temp += msg_temp_end;
item->add_button(0, icon_temp, signal_temp, false, msg_temp); item->add_button(0, icon_temp, signal_temp, false, msg_temp);
} }
} }