src/main.cpp

changeset 286
04478da357d0
parent 285
99af8bf63d10
child 289
a0ddbc9a4e77
equal deleted inserted replaced
285:99af8bf63d10 286:04478da357d0
142 QObject::tr("Open model"), 142 QObject::tr("Open model"),
143 "", 143 "",
144 QObject::tr("LDraw models (*.ldr *.dat)")); 144 QObject::tr("LDraw models (*.ldr *.dat)"));
145 } 145 }
146 146
147 #if 0
147 static const QString localeCode(const QString& locale) 148 static const QString localeCode(const QString& locale)
148 { 149 {
149 if (locale == "system") { 150 if (locale == "system") {
150 return QLocale::system().name(); 151 return QLocale::system().name();
151 } 152 }
169 { 170 {
170 qApp->installTranslator(translator); 171 qApp->installTranslator(translator);
171 } 172 }
172 } 173 }
173 } 174 }
175 #endif
174 176
175 static ModelData* findModelData(const DocumentManager* documents, ModelId modelId) 177 static ModelData* findModelData(const DocumentManager* documents, ModelId modelId)
176 { 178 {
177 return documents->findPayload<ModelData>(modelId); 179 return documents->findPayload<ModelData>(modelId);
178 } 180 }
463 }, action); 465 }, action);
464 }; 466 };
465 const auto restoreSettings = [&]{ 467 const auto restoreSettings = [&]{
466 recentlyOpenedFiles = setting<Setting::RecentFiles>(); 468 recentlyOpenedFiles = setting<Setting::RecentFiles>();
467 renderPreferences = loadRenderPreferences(); 469 renderPreferences = loadRenderPreferences();
468 changeLanguage(setting<Setting::Locale>(), &translator); 470 //changeLanguage(setting<Setting::Locale>(), &translator);
469 libraries.restoreFromSettings(); 471 libraries.restoreFromSettings();
470 updateRecentlyOpenedDocumentsMenu(); 472 updateRecentlyOpenedDocumentsMenu();
471 colorTable = loadColors(&libraries); 473 colorTable = loadColors(&libraries);
472 updateRenderPreferences(&ui, &renderPreferences, &documents); 474 updateRenderPreferences(&ui, &renderPreferences, &documents);
473 ui.mdiArea->setViewMode(setting<Setting::ViewMode>()); 475 ui.mdiArea->setViewMode(setting<Setting::ViewMode>());

mercurial