summaryrefslogtreecommitdiffstats
path: root/scene/gui/base_button.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-09-15 10:24:17 +0200
committerGitHub <noreply@github.com>2020-09-15 10:24:17 +0200
commit6f0fa8519fa44edae6b72852f646cab08dff1e57 (patch)
tree22bbd03f0a684c0b99f75804fffa6166033520b0 /scene/gui/base_button.cpp
parentbc15704c429f27754c9aa4d883b677857a340e34 (diff)
parent07cb95bbda7773c2267e46546a15acf72b12edb2 (diff)
downloadredot-engine-6f0fa8519fa44edae6b72852f646cab08dff1e57.tar.gz
Merge pull request #41776 from EricEzaM/PR/tooltip-bugfixes
Tooltip flickering and targeting fixes.
Diffstat (limited to 'scene/gui/base_button.cpp')
-rw-r--r--scene/gui/base_button.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 211082d610..2e77d20d4e 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -345,7 +345,7 @@ String BaseButton::get_tooltip(const Point2 &p_pos) const {
String tooltip = Control::get_tooltip(p_pos);
if (shortcut_in_tooltip && shortcut.is_valid() && shortcut->is_valid()) {
String text = shortcut->get_name() + " (" + shortcut->get_as_text() + ")";
- if (shortcut->get_name().nocasecmp_to(tooltip) != 0) {
+ if (tooltip != String() && shortcut->get_name().nocasecmp_to(tooltip) != 0) {
text += "\n" + tooltip;
}
tooltip = text;