diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 4e087c98f..9280865b0 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -1200,7 +1200,7 @@ void Choice::set_value(const boost::any& value, bool change_event) } case coEnum: { int val = boost::any_cast(value); - if (m_opt_id == "top_fill_pattern" || m_opt_id == "bottom_fill_pattern" || m_opt_id == "fill_pattern") + if (m_opt_id == "top_fill_pattern" || m_opt_id == "bottom_fill_pattern" || m_opt_id == "fill_pattern" || m_opt_id == "support_material_style") { std::string key; const t_config_enum_values& map_names = ConfigOptionEnum::get_enum_values(); @@ -1281,7 +1281,9 @@ boost::any& Choice::get_value() if (m_opt_id == "top_fill_pattern" || m_opt_id == "bottom_fill_pattern" || m_opt_id == "fill_pattern") { const std::string& key = m_opt.enum_values[field->GetSelection()]; m_value = int(ConfigOptionEnum::get_enum_values().at(key)); - } + } else if (m_opt_id == "support_material_style") { + m_value = int(ConfigOptionEnum::get_enum_values().at(m_opt.enum_values[field->GetSelection()])); + } else m_value = field->GetSelection(); } diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp index d4df48d50..199a1e8d7 100644 --- a/src/slic3r/GUI/GUI.cpp +++ b/src/slic3r/GUI/GUI.cpp @@ -286,7 +286,8 @@ static void add_config_substitutions(const ConfigSubstitutions& conf_substitutio bool is_infill = def->opt_key == "top_fill_pattern" || def->opt_key == "bottom_fill_pattern" || - def->opt_key == "fill_pattern"; + def->opt_key == "fill_pattern" || + def->opt_key == "support_material_style"; // Each infill doesn't use all list of infill declared in PrintConfig.hpp. // So we should "convert" val to the correct one diff --git a/src/slic3r/GUI/UnsavedChangesDialog.cpp b/src/slic3r/GUI/UnsavedChangesDialog.cpp index da1446fd6..11517bf10 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.cpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.cpp @@ -1217,7 +1217,8 @@ static wxString get_string_value(std::string opt_key, const DynamicPrintConfig& return get_string_from_enum(opt_key, config, opt_key == "top_fill_pattern" || opt_key == "bottom_fill_pattern" || - opt_key == "fill_pattern"); + opt_key == "fill_pattern" || + opt_key == "support_material_style"); } case coPoints: { if (opt_key == "bed_shape") {