+ Fixed get_config_value for coFloatOrPercent (percent mode allow non-just-int values)
This commit is contained in:
YuSanka 2019-09-02 14:02:26 +02:00
parent 107bb1a308
commit 94712544aa
3 changed files with 14 additions and 15 deletions

View file

@ -589,13 +589,11 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
switch (opt->type) {
case coFloatOrPercent:{
const auto &value = *config.option<ConfigOptionFloatOrPercent>(opt_key);
text_value = double_to_string(value.value);
if (value.percent)
{
text_value = wxString::Format(_T("%i"), int(value.value));
text_value += "%";
}
else
text_value = double_to_string(value.value);
ret = text_value;
break;
}