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:
bubnikv 2018-02-12 19:06:05 +01:00
parent 47d904a628
commit 6f92424bab

View file

@ -582,6 +582,13 @@ public:
ConfigOptionType type() const override { return static_type(); }
ConfigOption* clone() const override { return new ConfigOptionFloatOrPercent(*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
{ return this->value == rhs.value && this->percent == rhs.percent; }
double get_abs_value(double ratio_over) const