From 10c12b37ec90d2f795bbd859479d9e5c8f6899f9 Mon Sep 17 00:00:00 2001 From: Charly Mourglia Date: Wed, 9 May 2018 14:07:06 +0200 Subject: [PATCH] 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 (cherry picked from commit b09e0454bb4049c2cf92b92a7194d9c016fbb736) --- scene/gui/text_edit.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 5fa3076d5f1..b69a3cc4287 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4245,6 +4245,7 @@ void TextEdit::paste() { String clipboard = OS::get_singleton()->get_clipboard(); + begin_complex_operation(); if (selection.active) { selection.active = false; @@ -4261,6 +4262,8 @@ void TextEdit::paste() { } _insert_text_at_cursor(clipboard); + end_complex_operation(); + update(); }