mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX: support config editing of type FloatsOrPercents
Change-Id: If0821dc357b14f1b72aa1c89b3b0378947e80a5c Jira: none (cherry picked from commit 115fb9ce072273acf8df558a33fe48cf71f8e35b) (cherry picked from commit 0c03a6b3616b855ccad5e629834d09672de334d7)
This commit is contained in:
@@ -1024,7 +1024,16 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
|
||||
ret = text_value;
|
||||
break;
|
||||
}
|
||||
case coPercent:{
|
||||
case coFloatsOrPercents: {
|
||||
const auto &value = config.option<ConfigOptionFloatsOrPercents>(opt_key)->get_at(idx);
|
||||
|
||||
text_value = double_to_string(value.value);
|
||||
if (value.percent) text_value += "%";
|
||||
|
||||
ret = text_value;
|
||||
break;
|
||||
}
|
||||
case coPercent: {
|
||||
double val = config.option<ConfigOptionPercent>(opt_key)->value;
|
||||
ret = double_to_string(val);// += "%";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user