From ea8004052da99b5366bffa7a629500e5c040f02f Mon Sep 17 00:00:00 2001 From: ray90514 Date: Thu, 8 Apr 2021 23:43:50 +0800 Subject: [PATCH] Fix LineEdit undo behaves strangely (cherry picked from commit 7501c7f48aae218b693b5b37af6a00380457240e) --- scene/gui/line_edit.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 45c9b81737..40b799a5a2 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1258,6 +1258,7 @@ void LineEdit::set_text(String p_text) { clear_internal(); append_at_cursor(p_text); + _create_undo_state(); if (expand_to_text_length) { minimum_size_changed();