From 24ecc968d1861605daffae1211d33e07318d4780 Mon Sep 17 00:00:00 2001 From: Tvangeste Date: Sun, 20 Jan 2013 23:17:44 +0100 Subject: [PATCH] Fixed #169: Cannot deselect the article when 'select word' by single click is enabled. --- articlewebview.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/articlewebview.cc b/articlewebview.cc index da39c9b1..2feadafe 100644 --- a/articlewebview.cc +++ b/articlewebview.cc @@ -15,6 +15,7 @@ void ArticleWebView::mousePressEvent( QMouseEvent * event ) if ( selectionBySingleClick && ( event->buttons() & Qt::LeftButton ) ) { + findText(""); // clear the selection first, if any QMouseEvent ev( QEvent::MouseButtonDblClick, event->pos(), Qt::LeftButton, Qt::LeftButton, event->modifiers() ); QApplication::sendEvent( page(), &ev ); }