From d5467917d096ef779607db1620cf7add0826fa69 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 29 Oct 2021 11:03:01 +0200 Subject: [PATCH] Editor: Collect keyboard selections to the clipboard Fixes: QTCREATORBUG-26492 Change-Id: I36c3ae73d8d5b2ea92cee3fd7c568b958c3235ae Reviewed-by: Christian Stenger --- src/plugins/texteditor/texteditor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index a0ca47c5413..a54732ec39f 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -1572,6 +1572,7 @@ void TextEditorWidgetPrivate::slotSelectionChanged() m_selectBlockAnchor = QTextCursor(); // Clear any link which might be showing when the selection changes clearLink(); + setClipboardSelection(); } void TextEditorWidget::gotoBlockStart() @@ -5244,7 +5245,6 @@ void TextEditorWidget::mouseReleaseEvent(QMouseEvent *e) return; QPlainTextEdit::mouseReleaseEvent(e); - d->setClipboardSelection(); } void TextEditorWidget::mouseDoubleClickEvent(QMouseEvent *e) @@ -5259,7 +5259,6 @@ void TextEditorWidget::mouseDoubleClickEvent(QMouseEvent *e) } QPlainTextEdit::mouseDoubleClickEvent(e); - d->setClipboardSelection(); } void TextEditorWidgetPrivate::setClipboardSelection()