"CANCEL" button is deleted from "Support Generator" MessageDialog

to avoid confusions when "Supports mode" is switched from right panel
This commit is contained in:
YuSanka 2021-09-10 15:31:03 +02:00
parent b9b84f4f27
commit 670ec06b97

View file

@ -171,23 +171,14 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
"- Detect bridging perimeters"));
if (is_global_config)
msg_text += "\n\n" + _(L("Shall I adjust those settings for supports?"));
//wxMessageDialog dialog(nullptr, msg_text, _(L("Support Generator")),
MessageDialog dialog(nullptr, msg_text, _(L("Support Generator")),
wxICON_WARNING | (is_global_config ? wxYES | wxNO | wxCANCEL : wxOK));
MessageDialog dialog(nullptr, msg_text, _L("Support Generator"), wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK));
DynamicPrintConfig new_conf = *config;
auto answer = dialog.ShowModal();
if (!is_global_config || answer == wxID_YES) {
// Enable "detect bridging perimeters".
new_conf.set_key_value("overhangs", new ConfigOptionBool(true));
}
else if (answer == wxID_NO) {
// Do nothing, leave supports on and "detect bridging perimeters" off.
}
else if (answer == wxID_CANCEL) {
// Disable supports.
new_conf.set_key_value("support_material", new ConfigOptionBool(false));
support_material_overhangs_queried = false;
}
//else Do nothing, leave supports on and "detect bridging perimeters" off.
apply(config, &new_conf);
}
}