From 9fcab76de618356632bfeb55f513b4a2a0727a38 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 23 Mar 2021 14:46:21 +0100 Subject: [PATCH] TextEditor: Fix corrupted cursor after droping text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... by removing excess endEditBlock. Fixes: QTCREATORBUG-25305 Change-Id: I81fd2ee57a7a470fcc8e78475f336bf2b651a14b Reviewed-by: Eike Ziller Reviewed-by: Robert Löhning --- src/plugins/texteditor/texteditor.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 8b4d0bd8529..45fa0f6f60d 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -7766,7 +7766,6 @@ void TextEditorWidget::insertFromMimeData(const QMimeData *source) const int anchor = cursor.position(); cursor.insertText(text); const int pos = cursor.position(); - cursor.endEditBlock(); cursor.setPosition(anchor); cursor.setPosition(pos, QTextCursor::KeepAnchor); } else {