Display accurate precision for percent config values (#3466)

Percent config values are managed as float types, but decimal precision
is not displayed in the GUI. This change uses the `double_to_string()`
converstion rather than casting to an int when retrieving the config
option value.
This commit is contained in:
gswatkins 2024-01-09 08:56:17 -05:00 committed by GitHub
parent 0bf78f8e9e
commit b4925363d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -981,8 +981,7 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
}
case coPercent:{
double val = config.option<ConfigOptionPercent>(opt_key)->value;
text_value = wxString::Format(_T("%i"), int(val));
ret = text_value;// += "%";
ret = double_to_string(val);// += "%";
}
break;
case coPercents: