diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 30e3eb6b7..21633b5f4 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1468,9 +1468,34 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) } wxGetApp().plater()->update(); } + bool is_precise_z_height = m_config->option("precise_z_height")->value; + if (boost::any_cast(value) && is_precise_z_height) { + MessageDialog dlg(wxGetApp().plater(), _L("Enabling both precise Z height and the prime tower may cause the size of prime tower to increase. Do you still want to enable?"), + _L("Warning"), wxICON_WARNING | wxYES | wxNO); + if (dlg.ShowModal() == wxID_NO) { + DynamicPrintConfig new_conf = *m_config; + new_conf.set_key_value("enable_prime_tower", new ConfigOptionBool(false)); + m_config_manipulation.apply(m_config, &new_conf); + } + wxGetApp().plater()->update(); + } update_wiping_button_visibility(); } + if (opt_key == "precise_z_height") { + bool wipe_tower_enabled = m_config->option("enable_prime_tower")->value; + if (boost::any_cast(value) && wipe_tower_enabled) { + MessageDialog dlg(wxGetApp().plater(), _L("Enabling both precise Z height and the prime tower may cause the size of prime tower to increase. Do you still want to enable?"), + _L("Warning"), wxICON_WARNING | wxYES | wxNO); + if (dlg.ShowModal() == wxID_NO) { + DynamicPrintConfig new_conf = *m_config; + new_conf.set_key_value("precise_z_height", new ConfigOptionBool(false)); + m_config_manipulation.apply(m_config, &new_conf); + } + wxGetApp().plater()->update(); + } + } + // reload scene to update timelapse wipe tower if (opt_key == "timelapse_type") { bool wipe_tower_enabled = m_config->option("enable_prime_tower")->value;