mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-15 01:22:37 -07: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user