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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2018-04-13 14:43:53 +0300
committerLukas Matena <lukasmatena@seznam.cz>2018-04-13 14:43:53 +0300
commitabe6e8a783b62fc402aaea783906cb52a6381478 (patch)
tree08b39fa821879e8316bbcee2f72fe85ba910f792
parent52a3f4a2bbce38aab69dab6a62a943525cf7f699 (diff)
Bugfix: legacy config options were not properly processed
-rw-r--r--xs/src/libslic3r/Print.cpp2
-rw-r--r--xs/src/libslic3r/PrintConfig.cpp3
-rw-r--r--xs/src/libslic3r/PrintConfig.hpp7
3 files changed, 10 insertions, 2 deletions
diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp
index 4012b91f8..dcece7a9b 100644
--- a/xs/src/libslic3r/Print.cpp
+++ b/xs/src/libslic3r/Print.cpp
@@ -644,7 +644,7 @@ std::string Print::validate() const
unsigned int total_extruders_count = this->config.nozzle_diameter.size();
for (const auto& extruder_idx : extruders)
if ( extruder_idx >= total_extruders_count )
- return "One or more object have assigned an extruder that the printer does not have.";
+ return "One or more object were assigned an extruder that the printer does not have.";
for (PrintObject *object : this->objects) {
if ((object->config.support_material_extruder == -1 || object->config.support_material_interface_extruder == -1) &&
diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp
index 66576c9f1..1e7e0bacc 100644
--- a/xs/src/libslic3r/PrintConfig.cpp
+++ b/xs/src/libslic3r/PrintConfig.cpp
@@ -1944,8 +1944,9 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
"standby_temperature", "scale", "rotate", "duplicate", "duplicate_grid",
"start_perimeters_at_concave_points", "start_perimeters_at_non_overhang", "randomize_start",
"seal_position", "vibration_limit", "bed_size", "octoprint_host",
- "print_center", "g0", "threads", "pressure_advance"
+ "print_center", "g0", "threads", "pressure_advance", "wipe_tower_per_color_wipe"
};
+
if (ignore.find(opt_key) != ignore.end()) {
opt_key = "";
return;
diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp
index be64d35bd..967a87310 100644
--- a/xs/src/libslic3r/PrintConfig.hpp
+++ b/xs/src/libslic3r/PrintConfig.hpp
@@ -154,6 +154,13 @@ public:
// Validate the PrintConfig. Returns an empty string on success, otherwise an error message is returned.
std::string validate();
+
+ // Verify whether the opt_key has not been obsoleted or renamed.
+ // Both opt_key and value may be modified by handle_legacy().
+ // If the opt_key is no more valid in this version of Slic3r, opt_key is cleared by handle_legacy().
+ // handle_legacy() is called internally by set_deserialize().
+ void handle_legacy(t_config_option_key &opt_key, std::string &value) const override
+ { PrintConfigDef::handle_legacy(opt_key, value); }
};
template<typename CONFIG>