From 6888d957dcef2098ca8881c4b8733a5b36e2c877 Mon Sep 17 00:00:00 2001 From: Sofox Date: Tue, 9 Jan 2024 17:14:55 +0000 Subject: [PATCH] Fix LineEdit caret rendering/positioning on Undo. --- scene/gui/line_edit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 7d34358af22d..502e09cb6078 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1228,9 +1228,10 @@ void LineEdit::undo() { TextOperation op = undo_stack_pos->get(); text = op.text; scroll_offset = op.scroll_offset; - set_caret_column(op.caret_column); _shape(); + set_caret_column(op.caret_column); + _emit_text_change(); } @@ -1252,9 +1253,10 @@ void LineEdit::redo() { TextOperation op = undo_stack_pos->get(); text = op.text; scroll_offset = op.scroll_offset; - set_caret_column(op.caret_column); _shape(); + set_caret_column(op.caret_column); + _emit_text_change(); }