diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-10 07:48:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 07:48:32 +0200 |
commit | 68ecffb054c6f13bf72c8d78be300fabd747411c (patch) | |
tree | b3e2a243b2bd15ae8314ef4d553da93aba7b3dc9 | |
parent | 9c1ead556999434ceb15c82b3dda9573c681b66a (diff) | |
parent | 082cf5440ef8822d6addf5a21de7b86618663f19 (diff) |
Merge pull request #61868 from iwek7/line_edit_caret
Fix setting line edit caret after double and triple click
-rw-r--r-- | scene/gui/line_edit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index fa600d24ef..540250c8e9 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -312,7 +312,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) { selection.end = text.length(); selection.double_click = true; last_dblclk = 0; - caret_column = selection.begin; + set_caret_column(selection.begin); if (!pass && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CLIPBOARD_PRIMARY)) { DisplayServer::get_singleton()->clipboard_set_primary(text); } @@ -327,7 +327,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) { selection.begin = words[i]; selection.end = words[i + 1]; selection.double_click = true; - caret_column = selection.end; + set_caret_column(selection.end); break; } } |