Fix sidebar support combobox in SLA

This commit is contained in:
tamasmeszaros 2023-01-18 16:56:33 +01:00
parent 76d0e11699
commit ce2659141a
2 changed files with 8 additions and 4 deletions

View File

@ -555,10 +555,14 @@ FreqChangedParams::FreqChangedParams(wxWindow* parent) :
std::string treetype = get_sla_suptree_prefix(new_conf);
if (selection == _("Everywhere"))
if (selection == _("Everywhere")) {
new_conf.set_key_value(treetype + "support_buildplate_only", new ConfigOptionBool(false));
else if (selection == _("Support on build plate only"))
new_conf.set_key_value("support_enforcers_only", new ConfigOptionBool(false));
}
else if (selection == _("Support on build plate only")) {
new_conf.set_key_value(treetype + "support_buildplate_only", new ConfigOptionBool(true));
new_conf.set_key_value("support_enforcers_only", new ConfigOptionBool(false));
}
else if (selection == _("For support enforcers only")) {
new_conf.set_key_value("support_enforcers_only", new ConfigOptionBool(true));
}

View File

@ -1046,7 +1046,7 @@ static wxString support_combo_value_for_config(const DynamicPrintConfig &config,
return
! config.opt_bool(support) ?
_("None") :
(is_fff && !config.opt_bool("support_material_auto")) ?
((is_fff && !config.opt_bool("support_material_auto")) || (!is_fff && config.opt_bool("support_enforcers_only"))) ?
_("For support enforcers only") :
(config.opt_bool(buildplate_only) ? _("Support on build plate only") :
_("Everywhere"));
@ -1085,7 +1085,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
if (is_fff ?
(opt_key == "support_material" || opt_key == "support_material_auto" || opt_key == "support_material_buildplate_only") :
(opt_key == "supports_enable" || opt_key == "support_tree_type" || opt_key == get_sla_suptree_prefix(*m_config) + "support_buildplate_only"))
(opt_key == "supports_enable" || opt_key == "support_tree_type" || opt_key == get_sla_suptree_prefix(*m_config) + "support_buildplate_only" || opt_key == "support_enforcers_only"))
og_freq_chng_params->set_value("support", support_combo_value_for_config(*m_config, is_fff));
if (! is_fff && (opt_key == "pad_enable" || opt_key == "pad_around_object"))