summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-22 10:47:58 +0200
committerGitHub <noreply@github.com>2019-04-22 10:47:58 +0200
commit86aa22b2ac5e4ff9b8a22d47a375e481e93418fa (patch)
treecb777d7e00437ab1598781f3a3c6ee80a1b35535 /scene/gui
parent0fc67767a453825114821638657afe34009d3dcc (diff)
parentda2a0a3814d49a1bbddf722dafb91bf338367153 (diff)
Merge pull request #28266 from coldrye-collaboration/gh-28241
Fix LineEdit not expanded to text length on undo/redo
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/line_edit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 71ed5326a7..1e8d73b6a4 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();
}