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
path: root/src
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2022-07-15 19:54:11 +0300
committersupermerill <merill@free.fr>2022-08-10 21:56:25 +0300
commit5c73d9d35e3a0c55045917b04e435050d23ff8c8 (patch)
treeeb5850ccfced60c3b3bbb4aca64f192fa9e7102b /src
parente343bc7c6f7d9831bf2969faa726afc497aa3793 (diff)
Fix config loading for brim_offset
Added a piece of code into handle_legacy to check for aliases. '.mf3 files won't open 2.4.58.3' #2939
Diffstat (limited to 'src')
-rw-r--r--src/libslic3r/Format/3mf.cpp15
-rw-r--r--src/libslic3r/PrintConfig.cpp10
2 files changed, 18 insertions, 7 deletions
diff --git a/src/libslic3r/Format/3mf.cpp b/src/libslic3r/Format/3mf.cpp
index 2b3be08b2..653b74991 100644
--- a/src/libslic3r/Format/3mf.cpp
+++ b/src/libslic3r/Format/3mf.cpp
@@ -3350,13 +3350,14 @@ bool _3MF_Exporter::_add_custom_gcode_per_print_z_file_to_archive( mz_zip_archiv
//FIXME provide a version of PrusaSlicer that stored the project file (3MF).
static void handle_legacy_project_loaded(unsigned int version_project_file, DynamicPrintConfig& config)
{
- if (! config.has("brim_separation")) {
- if (auto *opt_elephant_foot = config.option<ConfigOptionFloat>("first_layer_size_compensation", false); opt_elephant_foot) {
- // Conversion from older PrusaSlicer which applied brim separation equal to elephant foot compensation.
- auto *opt_brim_separation = config.option<ConfigOptionFloat>("brim_separation", true);
- opt_brim_separation->value = opt_elephant_foot->value;
- }
- }
+ // SuSi: don't do that. It's hidden behavior.
+ //if (! config.has("brim_separation")) {
+ // if (auto *opt_elephant_foot = config.option<ConfigOptionFloat>("first_layer_size_compensation", false); opt_elephant_foot) {
+ // // Conversion from older PrusaSlicer which applied brim separation equal to elephant foot compensation.
+ // auto *opt_brim_separation = config.option<ConfigOptionFloat>("brim_separation", true);
+ // opt_brim_separation->value = -opt_elephant_foot->value;
+ // }
+ //}
}
bool is_project_3mf(const std::string& filename)
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp
index 845a2239a..47901e9eb 100644
--- a/src/libslic3r/PrintConfig.cpp
+++ b/src/libslic3r/PrintConfig.cpp
@@ -6979,6 +6979,16 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
}
if (! print_config_def.has(opt_key)) {
+ //check the aliases
+ for(const auto& entry : print_config_def.options) {
+ for (const std::string& alias : entry.second.aliases) {
+ if (alias == opt_key) {
+ // translate
+ opt_key = entry.first;
+ return;
+ }
+ }
+ }
opt_key = "";
return;
}