Fixed #169: Cannot deselect the article when 'select word' by single click is enabled.

This commit is contained in:
Tvangeste 2013-01-20 23:17:44 +01:00
parent 4d2a6f4819
commit 24ecc968d1

View file

@ -15,6 +15,7 @@ void ArticleWebView::mousePressEvent( QMouseEvent * event )
if ( selectionBySingleClick && ( event->buttons() & Qt::LeftButton ) ) 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() ); QMouseEvent ev( QEvent::MouseButtonDblClick, event->pos(), Qt::LeftButton, Qt::LeftButton, event->modifiers() );
QApplication::sendEvent( page(), &ev ); QApplication::sendEvent( page(), &ev );
} }