mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
remove duplicate of warning notification for wipe tower and precise z (#12192)
Fix duplicate of confirmation window for prime tower and precise z warning notification JIRA-23
This commit is contained in:
@@ -1546,57 +1546,15 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||||||
auto timelapse_type = m_config->option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
|
auto timelapse_type = m_config->option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
|
||||||
bool timelapse_enabled = timelapse_type->value == TimelapseType::tlSmooth;
|
bool timelapse_enabled = timelapse_type->value == TimelapseType::tlSmooth;
|
||||||
if (!boost::any_cast<bool>(value) && timelapse_enabled) {
|
if (!boost::any_cast<bool>(value) && timelapse_enabled) {
|
||||||
|
bool set_enable_prime_tower = false;
|
||||||
MessageDialog dlg(wxGetApp().plater(), _L("A prime tower is required for smooth timelapse. There may be flaws on the model without prime tower. Are you sure you want to disable prime tower?"),
|
MessageDialog dlg(wxGetApp().plater(), _L("A prime tower is required for smooth timelapse. There may be flaws on the model without prime tower. Are you sure you want to disable prime tower?"),
|
||||||
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
_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(true));
|
|
||||||
m_config_manipulation.apply(m_config, &new_conf);
|
|
||||||
}
|
|
||||||
wxGetApp().plater()->update();
|
|
||||||
}
|
|
||||||
bool is_precise_z_height = m_config->option<ConfigOptionBool>("precise_z_height")->value;
|
|
||||||
if (boost::any_cast<bool>(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 == "single_extruder_multi_material" ){
|
|
||||||
const auto bSEMM = m_config->opt_bool("single_extruder_multi_material");
|
|
||||||
wxGetApp().sidebar().show_SEMM_buttons(bSEMM);
|
|
||||||
wxGetApp().get_tab(Preset::TYPE_PRINT)->update();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(opt_key == "purge_in_prime_tower")
|
|
||||||
wxGetApp().get_tab(Preset::TYPE_PRINT)->update();
|
|
||||||
|
|
||||||
|
|
||||||
if (opt_key == "enable_prime_tower") {
|
|
||||||
auto timelapse_type = m_config->option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
|
|
||||||
bool timelapse_enabled = timelapse_type->value == TimelapseType::tlSmooth;
|
|
||||||
if (!boost::any_cast<bool>(value)) {
|
|
||||||
bool set_enable_prime_tower = false;
|
|
||||||
if (timelapse_enabled) {
|
|
||||||
MessageDialog
|
|
||||||
dlg(wxGetApp().plater(),
|
|
||||||
_L("A prime tower is required for smooth timelapse. There may be flaws on the model without prime tower. Are you sure you want to disable prime tower?"),
|
|
||||||
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
|
||||||
if (dlg.ShowModal() == wxID_NO) {
|
if (dlg.ShowModal() == wxID_NO) {
|
||||||
DynamicPrintConfig new_conf = *m_config;
|
DynamicPrintConfig new_conf = *m_config;
|
||||||
new_conf.set_key_value("enable_prime_tower", new ConfigOptionBool(true));
|
new_conf.set_key_value("enable_prime_tower", new ConfigOptionBool(true));
|
||||||
m_config_manipulation.apply(m_config, &new_conf);
|
m_config_manipulation.apply(m_config, &new_conf);
|
||||||
set_enable_prime_tower = true;
|
set_enable_prime_tower = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
bool enable_wrapping = m_config->option<ConfigOptionBool>("enable_wrapping_detection")->value;
|
bool enable_wrapping = m_config->option<ConfigOptionBool>("enable_wrapping_detection")->value;
|
||||||
if (enable_wrapping && !set_enable_prime_tower) {
|
if (enable_wrapping && !set_enable_prime_tower) {
|
||||||
MessageDialog dlg(wxGetApp().plater(),
|
MessageDialog dlg(wxGetApp().plater(),
|
||||||
@@ -1625,6 +1583,16 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||||||
update_wiping_button_visibility();
|
update_wiping_button_visibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (opt_key == "single_extruder_multi_material" ){
|
||||||
|
const auto bSEMM = m_config->opt_bool("single_extruder_multi_material");
|
||||||
|
wxGetApp().sidebar().show_SEMM_buttons(bSEMM);
|
||||||
|
wxGetApp().get_tab(Preset::TYPE_PRINT)->update();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(opt_key == "purge_in_prime_tower")
|
||||||
|
wxGetApp().get_tab(Preset::TYPE_PRINT)->update();
|
||||||
|
|
||||||
if (opt_key == "enable_wrapping_detection") {
|
if (opt_key == "enable_wrapping_detection") {
|
||||||
bool wipe_tower_enabled = m_config->option<ConfigOptionBool>("enable_prime_tower")->value;
|
bool wipe_tower_enabled = m_config->option<ConfigOptionBool>("enable_prime_tower")->value;
|
||||||
if (boost::any_cast<bool>(value) && !wipe_tower_enabled) {
|
if (boost::any_cast<bool>(value) && !wipe_tower_enabled) {
|
||||||
|
|||||||
Reference in New Issue
Block a user