diff options
author | Emmanuel Barroga <emmanuelbarroga@gmail.com> | 2019-07-09 07:01:38 -0700 |
---|---|---|
committer | Emmanuel Barroga <emmanuelbarroga@gmail.com> | 2019-07-09 07:01:38 -0700 |
commit | 1eb9abd4c5c2c5914629e62c27332093567bb622 (patch) | |
tree | 5cd4eeec4f44fa0b498b4030fc5b4ffa5185757f | |
parent | 8d6a95347537c5e3084f269bdf98d1128b67b29b (diff) |
Fix issue with displaying empty tooltip hint
Closes #30448
-rw-r--r-- | scene/main/viewport.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 334c49f7cc..24c8ee31b2 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1431,6 +1431,7 @@ void Viewport::_gui_show_tooltip() { Control *which = NULL; String tooltip = _gui_get_tooltip(gui.tooltip, gui.tooltip->get_global_transform().xform_inv(gui.tooltip_pos), &which); + tooltip = tooltip.strip_edges(); if (tooltip.length() == 0) return; // bye @@ -1460,7 +1461,7 @@ void Viewport::_gui_show_tooltip() { gui.tooltip_label->set_anchor_and_margin(MARGIN_TOP, Control::ANCHOR_BEGIN, ttp->get_margin(MARGIN_TOP)); gui.tooltip_label->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -ttp->get_margin(MARGIN_RIGHT)); gui.tooltip_label->set_anchor_and_margin(MARGIN_BOTTOM, Control::ANCHOR_END, -ttp->get_margin(MARGIN_BOTTOM)); - gui.tooltip_label->set_text(tooltip.strip_edges()); + gui.tooltip_label->set_text(tooltip); } rp->add_child(gui.tooltip_popup); |