mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
Forward compatibility - config substitutions:
1) Verify whether a value looks like an enum 2) Always report substitution of an enum with a boolean.
This commit is contained in:
parent
4fa651456d
commit
c7691ec95e
2 changed files with 16 additions and 3 deletions
|
@ -1330,11 +1330,11 @@ public:
|
|||
bool deserialize(const std::string &str, bool append = false) override
|
||||
{
|
||||
UNUSED(append);
|
||||
if (str == "1" || boost::iequals(str, "enabled") || boost::iequals(str, "on")) {
|
||||
if (str == "1") {
|
||||
this->value = true;
|
||||
return true;
|
||||
}
|
||||
if (str == "0" || boost::iequals(str, "disabled") || boost::iequals(str, "off")) {
|
||||
if (str == "0") {
|
||||
this->value = false;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue