diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index 889641536..a20fdf80c 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -615,7 +615,7 @@ bool ConfigBase::set_deserialize_raw(const t_config_option_key &opt_key_src, con if (! success && substitutions_ctxt.rule != ForwardCompatibilitySubstitutionRule::Disable && // Only allow substitutions of an enum value by another enum value or a boolean value with an enum value. // That means, we expect enum values being added in the future and possibly booleans being converted to enums. - (optdef->type == coEnum || optdef->type == coBool) && ConfigHelpers::looks_like_enum_value(value)) { + (optdef->type == coEnum || optdef->type == coEnums || optdef->type == coBool) /*&& ConfigHelpers::looks_like_enum_value(value)*/) { // Deserialize failed, try to substitute with a default value. //assert(substitutions_ctxt.rule == ForwardCompatibilitySubstitutionRule::Enable || substitutions_ctxt.rule == ForwardCompatibilitySubstitutionRule::EnableSilent); if (optdef->type == coBool) diff --git a/src/libslic3r/Config.hpp b/src/libslic3r/Config.hpp index 42fa9df62..3c7f13092 100644 --- a/src/libslic3r/Config.hpp +++ b/src/libslic3r/Config.hpp @@ -1701,12 +1701,12 @@ public: while (std::getline(is, item_str, ',')) { boost::trim(item_str); if (item_str == "nil") { - throw ConfigurationError("Deserializing nil into a non-nullable object"); + return false; } else { auto it = this->keys_map->find(item_str); if (it == this->keys_map->end()) - throw ConfigurationError(std::string("Unknown enum type: ") + item_str); + return false; this->values.push_back(it->second); } }