From b09e0454bb4049c2cf92b92a7194d9c016fbb736 Mon Sep 17 00:00:00 2001 From: Charly Mourglia Date: Wed, 9 May 2018 14:07:06 +0200 Subject: Consider TextEdit paste operation complex. Not considering a paste operation as a complex one ends up adding an unneeded extra step when pasting over a selection. This fixes issue #18325 --- scene/gui/text_edit.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scene/gui') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 4c9f515ced..4ff74dbb3f 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4236,6 +4236,7 @@ void TextEdit::paste() { String clipboard = OS::get_singleton()->get_clipboard(); + begin_complex_operation(); if (selection.active) { selection.active = false; @@ -4252,6 +4253,8 @@ void TextEdit::paste() { } _insert_text_at_cursor(clipboard); + end_complex_operation(); + update(); } -- cgit v1.2.3