diff --git a/src/texstudio.cpp b/src/texstudio.cpp index e4e11d9551..8300b54835 100644 --- a/src/texstudio.cpp +++ b/src/texstudio.cpp @@ -4151,6 +4151,10 @@ void Texstudio::editSpell() void Texstudio::editThesaurus(int line, int col) { + if(!mThesaurusWasStarted){ + ThesaurusDialog::prepareDatabase(configManager.parseDir(configManager.thesaurus_database)); + mThesaurusWasStarted=true; + } if (!ThesaurusDialog::retrieveDatabase()) { QMessageBox::warning(this, tr("Error"), tr("Can't load Thesaurus Database")); return; @@ -4417,7 +4421,6 @@ void Texstudio::readSettings(bool reread) spellerManager.setDefaultSpeller(configManager.spellLanguage); ThesaurusDialog::setUserPath(configManager.configFileNameBase); - ThesaurusDialog::prepareDatabase(configManager.parseDir(configManager.thesaurus_database)); symbolListModel = new SymbolListModel(config->value("Symbols/UsageCount").toMap(), config->value("Symbols/FavoriteIDs").toStringList()); @@ -6736,7 +6739,10 @@ void Texstudio::generalOptions() symbolListModel->setDarkmode(darkMode); - ThesaurusDialog::prepareDatabase(configManager.parseDir(configManager.thesaurus_database)); + if(mThesaurusWasStarted){ + // replace database with new one + ThesaurusDialog::prepareDatabase(configManager.parseDir(configManager.thesaurus_database)); + } if (additionalBibPaths != configManager.additionalBibPaths) documents.updateBibFiles(true); // update syntaxChecking with alls docs diff --git a/src/texstudio.h b/src/texstudio.h index 2fc0f5d93d..66b6d9d47f 100644 --- a/src/texstudio.h +++ b/src/texstudio.h @@ -707,6 +707,8 @@ private slots: StructureEntry *currentSection; + bool mThesaurusWasStarted=false; + public: Q_PROPERTY(QString clipboard READ clipboardText WRITE setClipboardText) Q_INVOKABLE QString clipboardText(const QClipboard::Mode &mode = QClipboard::Clipboard) const;