Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-11-03 21:14:33 +0300
committerbubnikv <bubnikv@gmail.com>2017-11-03 21:14:33 +0300
commite6ecb77d9add74311123ef70c36dd832dd72eaa0 (patch)
tree17ccdcd8941bbbf18ece5cd196974dc0702e536c /xs/src/slic3r
parentb11d9708edd7ad4041c2a91b865430047628a6f8 (diff)
Fixed loading of configs and configs from g-codes.
Diffstat (limited to 'xs/src/slic3r')
-rw-r--r--xs/src/slic3r/GUI/Preset.cpp4
-rw-r--r--xs/src/slic3r/GUI/PresetBundle.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/xs/src/slic3r/GUI/Preset.cpp b/xs/src/slic3r/GUI/Preset.cpp
index 05d1c3927..596e07c8e 100644
--- a/xs/src/slic3r/GUI/Preset.cpp
+++ b/xs/src/slic3r/GUI/Preset.cpp
@@ -115,7 +115,7 @@ DynamicPrintConfig& Preset::load(const std::vector<std::string> &keys)
if (! this->is_default) {
// Load the preset file, apply preset values on top of defaults.
try {
- this->config.load(this->file);
+ this->config.load_from_ini(this->file);
Preset::normalize(this->config);
} catch (const std::ifstream::failure&) {
throw std::runtime_error(std::string("The selected preset does not exist anymore: ") + this->file);
@@ -264,7 +264,7 @@ void PresetCollection::load_presets(const std::string &dir_path, const std::stri
Preset& PresetCollection::load_preset(const std::string &path, const std::string &name, const DynamicPrintConfig &config, bool select)
{
DynamicPrintConfig cfg(this->default_preset().config);
- cfg.apply(config, true);
+ cfg.apply_only(config, cfg.keys(), true);
return this->load_preset(path, name, std::move(cfg));
}
diff --git a/xs/src/slic3r/GUI/PresetBundle.cpp b/xs/src/slic3r/GUI/PresetBundle.cpp
index fc50f98e9..915bec6aa 100644
--- a/xs/src/slic3r/GUI/PresetBundle.cpp
+++ b/xs/src/slic3r/GUI/PresetBundle.cpp
@@ -295,7 +295,7 @@ void PresetBundle::load_config_file_config(const std::string &path, const Dynami
}
}
// Load the configs into this->filaments and make them active.
- filament_presets.clear();
+ this->filament_presets.clear();
for (size_t i = 0; i < configs.size(); ++ i) {
char suffix[64];
if (i == 0)
@@ -304,7 +304,7 @@ void PresetBundle::load_config_file_config(const std::string &path, const Dynami
sprintf(suffix, " (%d)", i);
// Load all filament presets, but only select the first one in the preset dialog.
this->filaments.load_preset(path, name + suffix, std::move(configs[i]), i == 0).is_external = true;
- filament_presets.emplace_back(name + suffix);
+ this->filament_presets.emplace_back(name + suffix);
}
}
}