From ce2659141afbecb3ae757fea9a32c140937682ee Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 18 Jan 2023 16:56:33 +0100 Subject: [PATCH] Fix sidebar support combobox in SLA --- src/slic3r/GUI/Plater.cpp | 8 ++++++-- src/slic3r/GUI/Tab.cpp | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 673c3892f..69a848496 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -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)); } diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index e519a52e3..6e43afc3c 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -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"))