FIX: coPoint type couldn't display

This causes the printer setting page unable to display becase I added a
coPoint type option best_object_pos.

Add reading and writing coPoint type configs solves the problem.

Jira: STUDIO-4303

Change-Id: I34e40e567236d28ab1a7be265128275191fcc935
This commit is contained in:
Arthur 2023-08-31 19:29:52 +08:00 committed by Lane.Wei
parent 7beed5d6dd
commit c7e78511f5
5 changed files with 72 additions and 11 deletions

View file

@ -198,6 +198,10 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt
config.option<ConfigOptionEnumsGeneric>(opt_key)->set_at(vec_new, opt_index, 0);
}
break;
case coPoint:{
config.set_key_value(opt_key, new ConfigOptionPoint(boost::any_cast<Vec2d>(value)));
}
break;
case coPoints:{
if (opt_key == "printable_area" || opt_key == "bed_exclude_area" || opt_key=="thumbnail_size") {
config.option<ConfigOptionPoints>(opt_key)->values = boost::any_cast<std::vector<Vec2d>>(value);