This commit is contained in:
bubnikv 2019-10-01 17:17:20 +02:00
commit 546ad99306
3 changed files with 6 additions and 3 deletions

View file

@ -2392,6 +2392,7 @@ void PrintConfigDef::init_sla_params()
"the threshold in the middle. This behaviour eliminates "
"antialiasing without losing holes in polygons.");
def->min = 0;
def->max = 1;
def->mode = comExpert;
def->set_default_value(new ConfigOptionFloat(1.0));

View file

@ -354,8 +354,7 @@ void ConfigManipulation::toggle_print_sla_options(DynamicPrintConfig* config)
toggle_field("pad_wall_slope", pad_en);
toggle_field("pad_around_object", pad_en);
bool has_suppad = pad_en && supports_en;
bool zero_elev = config->opt_bool("pad_around_object") && has_suppad;
bool zero_elev = config->opt_bool("pad_around_object") && pad_en;
toggle_field("support_object_elevation", supports_en && !zero_elev);
toggle_field("pad_object_gap", zero_elev);

View file

@ -1808,7 +1808,10 @@ void TabPrinter::build_fff()
optgroup->append_single_option_line("single_extruder_multi_material");
optgroup->m_on_change = [this, optgroup](t_config_option_key opt_key, boost::any value) {
size_t extruders_count = boost::any_cast<size_t>(optgroup->get_value("extruders_count"));
// optgroup->get_value() return int for def.type == coInt,
// Thus, there should be boost::any_cast<int> !
// Otherwise, boost::any_cast<size_t> causes an "unhandled unknown exception"
size_t extruders_count = size_t(boost::any_cast<int>(optgroup->get_value("extruders_count")));
wxTheApp->CallAfter([this, opt_key, value, extruders_count]() {
if (opt_key == "extruders_count" || opt_key == "single_extruder_multi_material") {
extruders_count_changed(extruders_count);