| 361 | } |
| 362 | |
| 363 | bool ConfigurationManager::ImportConfiguration(const LayerManager &layers, const Path &full_import_path, |
| 364 | std::string &configuration_name) { |
| 365 | assert(!full_import_path.Empty()); |
| 366 | |
| 367 | this->last_path_import_config = full_import_path.AbsoluteDir(); |
| 368 | |
| 369 | Configuration configuration; |
| 370 | if (!configuration.Load(full_import_path, layers)) { |
| 371 | return false; |
| 372 | } |
| 373 | |
| 374 | configuration_name = configuration.key = |
| 375 | MakeConfigurationName(this->available_configurations, configuration.key + " (Imported)"); |
| 376 | this->available_configurations.push_back(configuration); |
| 377 | this->SortConfigurations(); |
| 378 | |
| 379 | return true; |
| 380 | } |
| 381 | |
| 382 | bool ConfigurationManager::ExportConfiguration(const LayerManager &layers, const Path &full_export_path, |
| 383 | const std::string &configuration_name) { |