clear dictionary outside of the loop

This commit is contained in:
Xiao YiFang 2022-10-22 19:12:55 +08:00
parent c743a31dca
commit 7adfc523a2

View file

@ -430,6 +430,7 @@ ArticleRequest::ArticleRequest(
memcpy( &data.front(), header.data(), header.size() );
// Accumulate main forms
emit GlobalBroadcaster::instance()->dictionaryClear( ActiveDictIds{word} );
for( unsigned x = 0; x < activeDicts.size(); ++x )
{
@ -449,8 +450,6 @@ void ArticleRequest::altSearchFinished()
if ( altsDone )
return;
emit GlobalBroadcaster::instance()->dictionaryClear( ActiveDictIds{word} );
// Check every request for finishing
for( list< sptr< Dictionary::WordSearchRequest > >::iterator i =
altSearches.begin(); i != altSearches.end(); )