--- a/src/mainwindow.cpp Sun Jan 19 14:25:57 2020 +0200 +++ b/src/mainwindow.cpp Wed Jan 22 00:23:29 2020 +0200 @@ -135,7 +135,7 @@ void MainWindow::openModelForEditing(const QString& modelName) { - Document* document = new Document{this->documents.findModelByName(modelName), &this->documents}; + Document* document = new Document{this->documents.findModelByName(modelName), &this->documents, this->colorTable}; this->ui->tabs->addTab(document, modelName); this->ui->tabs->setCurrentWidget(document); document->restoreSplitterState(this->documentSplitterState); @@ -254,6 +254,7 @@ changeLanguage(defaultLocale.toString()); this->libraries.restoreFromSettings(&this->settings); this->updateRecentlyOpenedDocumentsMenu(); + this->loadColors(); } QString MainWindow::pathToTranslation(const QString& localeCode) @@ -261,3 +262,9 @@ QDir dir {":/locale"}; return dir.filePath(localeCode + ".qm"); } + +void MainWindow::loadColors() +{ + QTextStream errors; + this->colorTable = this->libraries.loadColorTable(errors); +}