Clean up missing directory behavior
This commit is contained in:
@@ -102,6 +102,11 @@ DlgGeneralImp::DlgGeneralImp( QWidget* parent )
|
||||
// Future work: the Add-On Manager will be modified to include a section for Preference Packs, at which point this
|
||||
// button will be modified to open the Add-On Manager to that tab.
|
||||
auto savedPreferencePacksDirectory = fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
|
||||
|
||||
// If that directory hasn't been created yet, just send the user to the preferences directory
|
||||
if (!(fs::exists(savedPreferencePacksDirectory) && fs::is_directory(savedPreferencePacksDirectory)))
|
||||
savedPreferencePacksDirectory = fs::path(App::Application::getUserAppDataDir());
|
||||
|
||||
QString pathToSavedPacks(QString::fromStdString(savedPreferencePacksDirectory.string()));
|
||||
connect(ui->ManagePreferencePacks, &QPushButton::clicked, this, [pathToSavedPacks]() { QDesktopServices::openUrl(QUrl::fromLocalFile(pathToSavedPacks)); });
|
||||
}
|
||||
|
||||
@@ -240,7 +240,6 @@ void copyTemplateParameters(Base::Reference<ParameterGrp> templateGroup, const s
|
||||
auto boolMap = templateGroup->GetBoolMap();
|
||||
for (const auto& kv : boolMap) {
|
||||
auto currentValue = userParameterHandle->GetBool(kv.first.c_str(), kv.second);
|
||||
Base::Console().Message("Parameter %s = %d\n", kv.first.c_str(), currentValue);
|
||||
outputGroup->SetBool(kv.first.c_str(), currentValue);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user