Skip to content

Commit 4a5ae8c

Browse files
Fix tooltip message of button that opens groups/signals dock
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com> Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
1 parent f4af820 commit 4a5ae8c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

editor/gui/scene_tree_editor.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -369,26 +369,26 @@ void SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
369369
msg_temp += String::utf8("") + String(E.name) + "\n";
370370
}
371371
}
372-
}
373-
if (num_connections >= 1 || num_groups >= 1) {
374-
if (num_groups < 1) {
375-
msg_temp += "\n";
376-
}
377-
msg_temp += TTR("Click to show signals dock.");
372+
} else {
373+
msg_temp += "\n";
378374
}
379375

380376
Ref<Texture2D> icon_temp;
381377
SceneTreeEditorButton signal_temp = BUTTON_SIGNALS;
378+
String msg_temp_end = TTR("Click to show signals dock.");
379+
382380
if (num_connections >= 1 && num_groups >= 1) {
383381
icon_temp = get_editor_theme_icon(SNAME("SignalsAndGroups"));
384382
} else if (num_connections >= 1) {
385383
icon_temp = get_editor_theme_icon(SNAME("Signals"));
386384
} else if (num_groups >= 1) {
387385
icon_temp = get_editor_theme_icon(SNAME("Groups"));
388386
signal_temp = BUTTON_GROUPS;
387+
msg_temp_end = TTR("Click to show groups dock.");
389388
}
390389

391390
if (num_connections >= 1 || num_groups >= 1) {
391+
msg_temp += msg_temp_end;
392392
item->add_button(0, icon_temp, signal_temp, false, msg_temp);
393393
}
394394
}

0 commit comments

Comments
 (0)