#528 wrong verification for coPercents when exporting bundles.

This commit is contained in:
supermerill 2020-10-05 16:53:22 +02:00
parent 9f32161318
commit 3453216c38

View File

@ -4862,6 +4862,7 @@ std::string FullPrintConfig::validate()
out_of_range = fopt->get_abs_value(1) < optdef->min || fopt->get_abs_value(1) > optdef->max; out_of_range = fopt->get_abs_value(1) < optdef->min || fopt->get_abs_value(1) > optdef->max;
break; break;
} }
case coPercents:
case coFloats: case coFloats:
for (double v : static_cast<const ConfigOptionVector<double>*>(opt)->values) for (double v : static_cast<const ConfigOptionVector<double>*>(opt)->values)
if (v < optdef->min || v > optdef->max) { if (v < optdef->min || v > optdef->max) {
@ -4869,13 +4870,6 @@ std::string FullPrintConfig::validate()
break; break;
} }
break; break;
case coPercents:
for (double v : static_cast<const ConfigOptionVector<double>*>(opt)->values)
if (v*0.01 < optdef->min || v * 0.01 > optdef->max) {
out_of_range = true;
break;
}
break;
case coInt: case coInt:
{ {
auto *iopt = static_cast<const ConfigOptionInt*>(opt); auto *iopt = static_cast<const ConfigOptionInt*>(opt);