summaryrefslogtreecommitdiff
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-01-13 17:05:46 +0100
committerGitHub <noreply@github.com>2018-01-13 17:05:46 +0100
commit69452fbc3754ed517280a674aa61b36de31cac7f (patch)
tree003547976c256bc3815c119b79bf799b021180a3 /scene/gui/text_edit.cpp
parent63e980f746d69bb1cd9b1712ec75b416e48b518d (diff)
parent8ae0624c808ee48c37a09f66a4ed98dd0ae6d972 (diff)
Merge pull request #15657 from paulloz/fix-textedit-undo-redo-selection
TextEdit: Fix selection issue with undo/redo
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index d673f21077..439b0ce605 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4878,6 +4878,8 @@ void TextEdit::undo() {
else
undo_stack_pos = undo_stack_pos->prev();
+ deselect();
+
TextOperation op = undo_stack_pos->get();
_do_text_op(op, true);
current_op.version = op.prev_version;
@@ -4912,6 +4914,8 @@ void TextEdit::redo() {
if (undo_stack_pos == NULL)
return; //nothing to do.
+ deselect();
+
TextOperation op = undo_stack_pos->get();
_do_text_op(op, false);
current_op.version = op.version;