summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorEric M <itsjusteza@gmail.com>2020-09-03 23:41:34 +1000
committerEric M <itsjusteza@gmail.com>2020-09-15 17:34:29 +1000
commit07cb95bbda7773c2267e46546a15acf72b12edb2 (patch)
tree64f41a897a1ec4cc3bed8797badb466320ef6327 /scene/gui
parent9fc4f17281a25a74a916c29dd629c7aca5498aab (diff)
Tooltip flickering and targeting fixes.
Diffstat (limited to 'scene/gui')
-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 6fef44481a..d6f16ab7db 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;