Explorar o código

Deselect on undo/redo in TextEdit

Paul Joannon %!s(int64=7) %!d(string=hai) anos
pai
achega
8ae0624c80
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      scene/gui/text_edit.cpp

+ 4 - 0
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;