diff options
author | jmb462 <jmb462@gmail.com> | 2021-12-12 09:12:26 +0100 |
---|---|---|
committer | jmb462 <jmb462@gmail.com> | 2021-12-12 09:12:26 +0100 |
commit | d44b33741bb54c4fea3b5b1f3503f9a4b3a56eb6 (patch) | |
tree | 6b353d07d4b24d0abedd1fafaa45e04cdd1cc9e2 /scene/main | |
parent | 092a2861277e7df87aec10516d713d0bf4adba79 (diff) |
Fix bad mouse offset to show tooltips in Tree
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index af4032a77d..007e5d1173 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1183,7 +1183,7 @@ void Viewport::_gui_show_tooltip() { Control *tooltip_owner = nullptr; String tooltip_text = _gui_get_tooltip( gui.tooltip_control, - gui.tooltip_control->get_screen_transform().xform_inv(gui.last_mouse_pos), + gui.tooltip_control->get_global_transform().xform_inv(gui.last_mouse_pos), &tooltip_owner); tooltip_text = tooltip_text.strip_edges(); if (tooltip_text.is_empty()) { @@ -1712,7 +1712,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { if (gui.tooltip_popup) { if (gui.tooltip_control) { - String tooltip = _gui_get_tooltip(over, gui.tooltip_control->get_screen_transform().xform_inv(mpos)); + String tooltip = _gui_get_tooltip(over, gui.tooltip_control->get_global_transform().xform_inv(mpos)); if (tooltip.length() == 0) { _gui_cancel_tooltip(); |