mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Complited "update" for TabPrint.
!->It's one unresolved problem - dlg->ShowModal() call update(). Added "get_field" at Tab & Page. Extended "change_opt_value" Extended "get_value" to Choise.
This commit is contained in:
parent
129bd898cd
commit
3567981089
6 changed files with 311 additions and 196 deletions
|
@ -198,10 +198,10 @@ void change_opt_value(DynamicPrintConfig& config, t_config_option_key opt_key, b
|
|||
switch (config.def()->get(opt_key)->type){
|
||||
case coFloatOrPercent:{
|
||||
const auto &val = *config.option<ConfigOptionFloatOrPercent>(opt_key);
|
||||
config.set_key_value(opt_key, new ConfigOptionFloatOrPercent(boost::any_cast</*ConfigOptionFloatOrPercent*/double>(value), val.percent));
|
||||
config.set_key_value(opt_key, new ConfigOptionFloatOrPercent(boost::any_cast<double>(value), val.percent));
|
||||
break;}
|
||||
case coPercent:
|
||||
config.set_key_value(opt_key, new ConfigOptionPercent(boost::any_cast</*ConfigOptionPercent*/double>(value)));
|
||||
config.set_key_value(opt_key, new ConfigOptionPercent(boost::any_cast<double>(value)));
|
||||
break;
|
||||
case coFloat:{
|
||||
double& val = config.opt_float(opt_key);
|
||||
|
@ -231,7 +231,17 @@ void change_opt_value(DynamicPrintConfig& config, t_config_option_key opt_key, b
|
|||
break;
|
||||
case coInts:
|
||||
break;
|
||||
case coEnum:
|
||||
case coEnum:{
|
||||
if (opt_key.compare("external_fill_pattern") == 0 ||
|
||||
opt_key.compare("fill_pattern") == 0)
|
||||
config.set_key_value(opt_key, new ConfigOptionEnum<InfillPattern>(boost::any_cast<InfillPattern>(value)));
|
||||
else if (opt_key.compare("gcode_flavor") == 0)
|
||||
config.set_key_value(opt_key, new ConfigOptionEnum<GCodeFlavor>(boost::any_cast<GCodeFlavor>(value)));
|
||||
else if (opt_key.compare("support_material_pattern") == 0)
|
||||
config.set_key_value(opt_key, new ConfigOptionEnum<SupportMaterialPattern>(boost::any_cast<SupportMaterialPattern>(value)));
|
||||
else if (opt_key.compare("seam_position") == 0)
|
||||
config.set_key_value(opt_key, new ConfigOptionEnum<SeamPosition>(boost::any_cast<SeamPosition>(value)));
|
||||
}
|
||||
break;
|
||||
case coPoints:
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue