mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +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 )
|
if ( cfg.preferences.doubleClickTranslates )
|
||||||
{
|
{
|
||||||
QString selectedText = ui.definition->selectedText();
|
QString selectedText = ui.definition->selectedText();
|
||||||
|
|
||||||
|
// ignore empty word;
|
||||||
|
if( selectedText.isEmpty() )
|
||||||
|
return;
|
||||||
|
|
||||||
emit sendWordToInputLine( 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() &&
|
||||||
|
|
Loading…
Reference in a new issue