mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Fixed #169: Cannot deselect the article when 'select word' by single click is enabled.
This commit is contained in:
parent
4d2a6f4819
commit
24ecc968d1
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue