From 4b05c10308b86af96af0de9151c3aacf883af536 Mon Sep 17 00:00:00 2001 From: novist Date: Sat, 27 Dec 2014 20:59:43 +0200 Subject: [PATCH] Fixed text copying from chat windows Tiny formatting fix (space after if) --- src/widget/chatareawidget.cpp | 2 +- src/widget/form/genericchatform.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widget/chatareawidget.cpp b/src/widget/chatareawidget.cpp index 22886ba8c..aeb138014 100644 --- a/src/widget/chatareawidget.cpp +++ b/src/widget/chatareawidget.cpp @@ -65,7 +65,7 @@ void ChatAreaWidget::mouseReleaseEvent(QMouseEvent * event) QTextCursor cursor(document()); cursor.setPosition(pos); - if(!cursor.atEnd()) + if (!cursor.atEnd()) { cursor.setPosition(pos+1); diff --git a/src/widget/form/genericchatform.cpp b/src/widget/form/genericchatform.cpp index 30dadae74..411af8350 100644 --- a/src/widget/form/genericchatform.cpp +++ b/src/widget/form/genericchatform.cpp @@ -255,7 +255,8 @@ void GenericChatForm::onEmoteButtonClicked() void GenericChatForm::onChatWidgetClicked() { - msgEdit->setFocus(); + if (!chatWidget->textCursor().hasSelection()) + msgEdit->setFocus(); } void GenericChatForm::onEmoteInsertRequested(QString str)