mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Fix for #2845
+ Fixed get_config_value for coFloatOrPercent (percent mode allow non-just-int values)
This commit is contained in:
parent
107bb1a308
commit
94712544aa
3 changed files with 14 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue