mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-18 02:12:18 -07: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:
parent
fc76348330
commit
f33f2fbc7d
4 changed files with 53 additions and 31 deletions
|
|
@ -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);// += "%";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue