mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
fix:return directly when the searched word is empty
This commit is contained in:
parent
208cd50979
commit
6d9a6c3d6b
|
@ -401,6 +401,8 @@ void ArticleView::showDefinition( Config::InputPhrase const & phrase, unsigned g
|
||||||
Contexts const & contexts_ )
|
Contexts const & contexts_ )
|
||||||
{
|
{
|
||||||
currentWord = phrase.phrase.trimmed();
|
currentWord = phrase.phrase.trimmed();
|
||||||
|
if( currentWord.isEmpty() )
|
||||||
|
return;
|
||||||
historyMode = false;
|
historyMode = false;
|
||||||
currentActiveDictIds.clear();
|
currentActiveDictIds.clear();
|
||||||
// first, let's stop the player
|
// first, let's stop the player
|
||||||
|
@ -485,6 +487,8 @@ void ArticleView::showDefinition( QString const & word, QStringList const & dict
|
||||||
if( dictIDs.isEmpty() )
|
if( dictIDs.isEmpty() )
|
||||||
return;
|
return;
|
||||||
currentWord = word.trimmed();
|
currentWord = word.trimmed();
|
||||||
|
if( currentWord.isEmpty() )
|
||||||
|
return;
|
||||||
historyMode = false;
|
historyMode = false;
|
||||||
// first, let's stop the player
|
// first, let's stop the player
|
||||||
audioPlayer->stop();
|
audioPlayer->stop();
|
||||||
|
|
Loading…
Reference in a new issue