diff options
author | bubnikv <bubnikv@gmail.com> | 2019-08-08 10:48:56 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2019-08-08 10:48:56 +0300 |
commit | 8970ee28b26edd41496f268e5426d628e5b0db2a (patch) | |
tree | 8497b3496584ae4f0cb913568d03e7d7f53acc5a /src/slic3r | |
parent | b7f93292fa147d9f6bfd0ca7ae7df03728fe0c7b (diff) |
Fixed linking of the "pad" combo box of the Plater with the respective
pad boolean values of the configuration layer.
Diffstat (limited to 'src/slic3r')
-rw-r--r-- | src/slic3r/GUI/Field.cpp | 2 | ||||
-rw-r--r-- | src/slic3r/GUI/Tab.cpp | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 39fa9c54b..72e5fb8f9 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -905,7 +905,7 @@ boost::any& Choice::get_value() wxString ret_str = field->GetValue(); // options from right panel - std::vector <std::string> right_panel_options{ "support", "scale_unit" }; + std::vector <std::string> right_panel_options{ "support", "pad", "scale_unit" }; for (auto rp_option: right_panel_options) if (m_opt_id == rp_option) return m_value = boost::any(ret_str); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index c0ff5644b..0377fdbbf 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -834,6 +834,11 @@ static wxString support_combo_value_for_config(const DynamicPrintConfig &config, _("Everywhere")); } +static wxString pad_combo_value_for_config(const DynamicPrintConfig &config) +{ + return config.opt_bool("pad_enable") ? (config.opt_bool("pad_zero_elevation") ? _("Around object") : _("Below object")) : _("None"); +} + void Tab::on_value_change(const std::string& opt_key, const boost::any& value) { if (wxGetApp().plater() == nullptr) { @@ -853,6 +858,9 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) (opt_key == "supports_enable" || opt_key == "support_buildplate_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_zero_elevation")) + og_freq_chng_params->set_value("pad", pad_combo_value_for_config(*m_config)); + if (opt_key == "brim_width") { bool val = m_config->opt_float("brim_width") > 0.0 ? true : false; @@ -987,6 +995,8 @@ void Tab::update_frequently_changed_parameters() if (!og_freq_chng_params) return; og_freq_chng_params->set_value("support", support_combo_value_for_config(*m_config, is_fff)); + if (! is_fff) + og_freq_chng_params->set_value("pad", pad_combo_value_for_config(*m_config)); const std::string updated_value_key = is_fff ? "fill_density" : "pad_enable"; |