From 51701ce4aa5812c1ddaf13704626fbfd27adb0f4 Mon Sep 17 00:00:00 2001 From: Xiao Yi Fang Date: Tue, 20 Aug 2024 10:48:31 +0800 Subject: [PATCH] opt: double click in welcome page --- src/ui/articleview.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/articleview.cc b/src/ui/articleview.cc index d5d871f6..45722dce 100644 --- a/src/ui/articleview.cc +++ b/src/ui/articleview.cc @@ -2005,12 +2005,16 @@ void ArticleView::doubleClicked( QPoint pos ) else { QUrl const & ref = webview->url(); + auto groupId = getGroup( ref ); + if ( groupId == 0 || groupId == Instances::Group::HelpGroupId ) { + groupId = currentGroupId; + } if ( Utils::Url::hasQueryItem( ref, "dictionaries" ) ) { QStringList dictsList = Utils::Url::queryItemValue( ref, "dictionaries" ).split( ",", Qt::SkipEmptyParts ); - showDefinition( selectedText, dictsList, getGroup( ref ), false ); + showDefinition( selectedText, dictsList, groupId, false ); } else - showDefinition( selectedText, getGroup( ref ), getCurrentArticle() ); + showDefinition( selectedText, groupId, getCurrentArticle() ); } } }