From 8ae0624c808ee48c37a09f66a4ed98dd0ae6d972 Mon Sep 17 00:00:00 2001 From: Paul Joannon Date: Sat, 13 Jan 2018 11:38:01 +0100 Subject: [PATCH] Deselect on undo/redo in TextEdit --- scene/gui/text_edit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index d673f210777..439b0ce605c 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;