optimize: double click send select text to tranlateline box.

This commit is contained in:
xiaoyifang 2022-03-30 15:21:16 +08:00
parent 0094bf9f0d
commit 03653925be

View file

@ -2046,7 +2046,7 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
} }
} }
qDebug( "title = %s\n", r->title().toLocal8Bit().data() ); qDebug()<< "title = "<< r->title();
} }
@ -2283,7 +2283,7 @@ void ArticleView::doubleClicked( QPoint pos )
if ( cfg.preferences.doubleClickTranslates ) if ( cfg.preferences.doubleClickTranslates )
{ {
QString selectedText = ui.definition->selectedText(); QString selectedText = ui.definition->selectedText();
emit sendWordToInputLine( selectedText );
// Do some checks to make sure there's a sensible selection indeed // Do some checks to make sure there's a sensible selection indeed
if ( Folding::applyWhitespaceOnly( gd::toWString( selectedText ) ).size() && if ( Folding::applyWhitespaceOnly( gd::toWString( selectedText ) ).size() &&
selectedText.size() < 60 ) selectedText.size() < 60 )