Merge pull request #5803 from jarfil/issue/origin5695-pr

Fix tooltips blinking
This commit is contained in:
Juan Linietsky 2016-07-24 12:37:17 -03:00 committed by GitHub
commit 6e3c7fe5fe
1 changed files with 15 additions and 1 deletions

View File

@ -2034,8 +2034,22 @@ void Viewport::_gui_input_event(InputEvent p_event) {
}
bool is_tooltip_shown = false;
if (can_tooltip) {
if (gui.tooltip_popup) {
if (can_tooltip) {
String tooltip = over->get_tooltip(gui.tooltip->get_global_transform().xform_inv(mpos));
if (tooltip.length() == 0)
_gui_cancel_tooltip();
else if (tooltip == gui.tooltip_label->get_text())
is_tooltip_shown = true;
}
else
_gui_cancel_tooltip();
}
if (can_tooltip && !is_tooltip_shown) {
gui.tooltip=over;
gui.tooltip_pos=mpos;//(parent_xform * get_transform()).affine_inverse().xform(pos);