mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
fix: double click image will clear translate input line
This commit is contained in:
parent
2c5f74445a
commit
20f51fc7f2
|
@ -2275,6 +2275,11 @@ void ArticleView::doubleClicked( QPoint pos )
|
|||
if ( cfg.preferences.doubleClickTranslates )
|
||||
{
|
||||
QString selectedText = ui.definition->selectedText();
|
||||
|
||||
// ignore empty word;
|
||||
if( selectedText.isEmpty() )
|
||||
return;
|
||||
|
||||
emit sendWordToInputLine( selectedText );
|
||||
// Do some checks to make sure there's a sensible selection indeed
|
||||
if ( Folding::applyWhitespaceOnly( gd::toWString( selectedText ) ).size() &&
|
||||
|
|
Loading…
Reference in a new issue