From 07cb95bbda7773c2267e46546a15acf72b12edb2 Mon Sep 17 00:00:00 2001 From: Eric M Date: Thu, 3 Sep 2020 23:41:34 +1000 Subject: Tooltip flickering and targeting fixes. --- scene/gui/base_button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/gui/base_button.cpp') 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; -- cgit v1.2.3