mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
A regression error has been introduced into Slic3r 1.38.xx series for the float/percent config value, where the value was considered unchanged if the percent sign has been added or removed.
This commit is contained in:
parent
47d904a628
commit
6f92424bab
1 changed files with 7 additions and 0 deletions
|
@ -582,6 +582,13 @@ public:
|
||||||
ConfigOptionType type() const override { return static_type(); }
|
ConfigOptionType type() const override { return static_type(); }
|
||||||
ConfigOption* clone() const override { return new ConfigOptionFloatOrPercent(*this); }
|
ConfigOption* clone() const override { return new ConfigOptionFloatOrPercent(*this); }
|
||||||
ConfigOptionFloatOrPercent& operator=(const ConfigOption *opt) { this->set(opt); return *this; }
|
ConfigOptionFloatOrPercent& operator=(const ConfigOption *opt) { this->set(opt); return *this; }
|
||||||
|
bool operator==(const ConfigOption &rhs) const override
|
||||||
|
{
|
||||||
|
if (rhs.type() != this->type())
|
||||||
|
throw std::runtime_error("ConfigOptionFloatOrPercent: Comparing incompatible types");
|
||||||
|
assert(dynamic_cast<const ConfigOptionFloatOrPercent*>(&rhs));
|
||||||
|
return *this == *static_cast<const ConfigOptionFloatOrPercent*>(&rhs);
|
||||||
|
}
|
||||||
bool operator==(const ConfigOptionFloatOrPercent &rhs) const
|
bool operator==(const ConfigOptionFloatOrPercent &rhs) const
|
||||||
{ return this->value == rhs.value && this->percent == rhs.percent; }
|
{ return this->value == rhs.value && this->percent == rhs.percent; }
|
||||||
double get_abs_value(double ratio_over) const
|
double get_abs_value(double ratio_over) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue