mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 00:11:57 +08:00
SLA overrides: Fixed preset update, when config is loaded from old PS
+ Config.cpp: Fixed comparison of nil values
This commit is contained in:
parent
91e67e2e16
commit
e8214901d4
@ -389,6 +389,8 @@ public:
|
|||||||
if (rhs.type() != this->type())
|
if (rhs.type() != this->type())
|
||||||
throw ConfigurationError("ConfigOptionSingle: Comparing incompatible types");
|
throw ConfigurationError("ConfigOptionSingle: Comparing incompatible types");
|
||||||
assert(dynamic_cast<const ConfigOptionSingle*>(&rhs));
|
assert(dynamic_cast<const ConfigOptionSingle*>(&rhs));
|
||||||
|
if (this->is_nil() && rhs.is_nil())
|
||||||
|
return true;
|
||||||
return this->value == static_cast<const ConfigOptionSingle*>(&rhs)->value;
|
return this->value == static_cast<const ConfigOptionSingle*>(&rhs)->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2640,6 +2640,8 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
|||||||
config.apply(loaded_printer_technology == ptFFF ?
|
config.apply(loaded_printer_technology == ptFFF ?
|
||||||
static_cast<const ConfigBase&>(FullPrintConfig::defaults()) :
|
static_cast<const ConfigBase&>(FullPrintConfig::defaults()) :
|
||||||
static_cast<const ConfigBase&>(SLAFullPrintConfig::defaults()));
|
static_cast<const ConfigBase&>(SLAFullPrintConfig::defaults()));
|
||||||
|
// Set all the nullable values in defaults to nils.
|
||||||
|
config.null_nullables();
|
||||||
// and place the loaded config over the base.
|
// and place the loaded config over the base.
|
||||||
config += std::move(config_loaded);
|
config += std::move(config_loaded);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user