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 } |
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>()); |