[TD]fix preference file handling

This commit is contained in:
Wanderer Fan
2022-06-03 12:19:03 -04:00
committed by WandererFan
parent b4c21869f2
commit 74085b609d
6 changed files with 61 additions and 33 deletions

View File

@@ -190,6 +190,9 @@ QString PreferencesGui::weldingDirectory()
GetGroup("Preferences")->GetGroup("Mod/TechDraw/Files");
std::string symbolDir = hGrp->GetASCII("WeldingDir", defaultDir.c_str());
if (symbolDir.empty()) {
symbolDir = defaultDir;
}
QString qSymbolDir = QString::fromUtf8(symbolDir.c_str());
Base::FileInfo fi(symbolDir);
if (!fi.isReadable()) {