diff options
author | jmb462 <jmb462@gmail.com> | 2021-08-31 17:43:35 +0200 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2021-12-06 14:29:48 +0100 |
commit | 81efebb3a170dd6194905599361c38ae4246c434 (patch) | |
tree | 0dc5df12b8df69c2272836bfbb66bbb30037a709 /scene/gui/text_edit.cpp | |
parent | ede7614fe2e088f9ece1e1aba5cb3d5fceb476e4 (diff) |
Fix bad popups offset in editor with single window off
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com>
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r-- | scene/gui/text_edit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index bc30bf4447..c54b4dda00 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1624,7 +1624,7 @@ void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) { } _generate_context_menu(); - menu->set_position(get_screen_transform().xform(mpos)); + menu->set_position(get_screen_position() + mpos); menu->reset_size(); menu->popup(); grab_focus(); @@ -1871,7 +1871,7 @@ void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) { if (context_menu_enabled) { _generate_context_menu(); adjust_viewport_to_caret(); - menu->set_position(get_screen_transform().xform(get_caret_draw_pos())); + menu->set_position(get_screen_position() + get_caret_draw_pos()); menu->reset_size(); menu->popup(); menu->grab_focus(); |