From 693f3c9d62534aeee90fd408129abdaa8902ce15 Mon Sep 17 00:00:00 2001 From: Carsten Klein Date: Sun, 21 Apr 2019 10:51:10 +0200 Subject: [PATCH] Call minimum_size_changed() on redo/undo if expand_to_text_length is true Fixes #28241 (cherry picked from commit da2a0a3814d49a1bbddf722dafb91bf338367153) --- scene/gui/line_edit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 0414f99ac5f..290548f0168 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -920,6 +920,10 @@ void LineEdit::undo() { TextOperation op = undo_stack_pos->get(); text = op.text; set_cursor_position(op.cursor_pos); + + if (expand_to_text_length) + minimum_size_changed(); + _emit_text_change(); } @@ -934,6 +938,10 @@ void LineEdit::redo() { TextOperation op = undo_stack_pos->get(); text = op.text; set_cursor_position(op.cursor_pos); + + if (expand_to_text_length) + minimum_size_changed(); + _emit_text_change(); }