diff options
author | Carsten Klein <trancesilken@gmail.com> | 2019-04-21 10:51:10 +0200 |
---|---|---|
committer | Carsten Klein <trancesilken@gmail.com> | 2019-04-21 19:10:01 +0200 |
commit | da2a0a3814d49a1bbddf722dafb91bf338367153 (patch) | |
tree | ccbadc7e4e6645f4a3b1eef91d8dcf2ff425d500 | |
parent | 03dfac8609c01de4cfc219a5703ece2f2bb6b3f1 (diff) |
Call minimum_size_changed() on redo/undo if expand_to_text_length is true
Fixes #28241
-rw-r--r-- | scene/gui/line_edit.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 0c5dc39273..f807104b30 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -918,6 +918,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(); } @@ -932,6 +936,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(); } |