Skip to content

Commit

Permalink
fix:edit dictionaries dialog ,memory consume too much
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Feb 28, 2022
1 parent c599d05 commit c9d053d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2050,8 +2050,10 @@ void MainWindow::editDictionaries( unsigned editDictionaryGroup )
closeHeadwordsDialog();
closeFullTextSearchDialog();

ftsIndexing.stopIndexing();
ftsIndexing.clearDictionaries();
// the full index does not have to wait until this function invoked.

// ftsIndexing.stopIndexing();
// ftsIndexing.clearDictionaries();

wordFinder.clear();
dictionariesUnmuted.clear();
Expand Down Expand Up @@ -2108,14 +2110,14 @@ void MainWindow::editDictionaries( unsigned editDictionaryGroup )
makeScanPopup();
installHotKeys();

for( unsigned x = 0; x < dictionaries.size(); x++ )
{
dictionaries[ x ]->setFTSParameters( cfg.preferences.fts );
dictionaries[ x ]->setSynonymSearchEnabled( cfg.preferences.synonymSearchEnabled );
}
// for( unsigned x = 0; x < dictionaries.size(); x++ )
// {
// dictionaries[ x ]->setFTSParameters( cfg.preferences.fts );
// dictionaries[ x ]->setSynonymSearchEnabled( cfg.preferences.synonymSearchEnabled );
// }

ftsIndexing.setDictionaries( dictionaries );
ftsIndexing.doIndexing();
// ftsIndexing.setDictionaries( dictionaries );
// ftsIndexing.doIndexing();
}

void MainWindow::editCurrentGroup()
Expand Down

0 comments on commit c9d053d

Please sign in to comment.