From 0040724b6f5392bbdbb805c9a294be1c328c4777 Mon Sep 17 00:00:00 2001 From: yifang Date: Thu, 3 Mar 2022 23:13:04 +0800 Subject: [PATCH] Revert "fix:edit dictionaries dialog ,memory consume too much" This reverts commit c9d053d227cdc6e5dea15da3892789948d5df01f. --- mainwindow.cc | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/mainwindow.cc b/mainwindow.cc index 16deee72..6568cefb 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -2050,10 +2050,8 @@ void MainWindow::editDictionaries( unsigned editDictionaryGroup ) closeHeadwordsDialog(); closeFullTextSearchDialog(); - // the full index does not have to wait until this function invoked. - -// ftsIndexing.stopIndexing(); -// ftsIndexing.clearDictionaries(); + ftsIndexing.stopIndexing(); + ftsIndexing.clearDictionaries(); wordFinder.clear(); dictionariesUnmuted.clear(); @@ -2110,14 +2108,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()