FIX: the error message dialog is always show when modify params
Jira: STUDIO-4781 Change-Id: I93797861843e89fdc80be38859bd8043b2b51aa6
This commit is contained in:
parent
4f99ec3717
commit
89c1395f27
|
@ -321,26 +321,6 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
|||
is_msg_dlg_already_exist = false;
|
||||
}
|
||||
|
||||
if (config->opt_enum<PrintSequence>("print_sequence") == PrintSequence::ByObject) {
|
||||
auto printer_structure_opt = wxGetApp().preset_bundle->printers.get_edited_preset().config.option<ConfigOptionEnum<PrinterStructure>>("printer_structure");
|
||||
if (printer_structure_opt && printer_structure_opt->value == PrinterStructure::psI3) {
|
||||
wxString msg_text = _(L("When print by object, machines with I3 structure will not generate timelapse videos."));
|
||||
|
||||
if (is_global_config)
|
||||
msg_text += "\n\n" + _(L("Still print by object?"));
|
||||
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK));
|
||||
auto answer = dialog.ShowModal();
|
||||
if (answer == wxID_NO) {
|
||||
is_msg_dlg_already_exist = true;
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
new_conf.set_key_value("print_sequence", new ConfigOptionEnum<TimelapseType>(tlTraditional));
|
||||
apply(config, &new_conf);
|
||||
is_msg_dlg_already_exist = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//BBS
|
||||
//if (config->opt_enum<PerimeterGeneratorType>("wall_generator") == PerimeterGeneratorType::Arachne &&
|
||||
// config->opt_bool("enable_overhang_speed"))
|
||||
|
|
|
@ -1424,6 +1424,23 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||
}
|
||||
}
|
||||
|
||||
if (opt_key == "print_sequence" && m_config->opt_enum<PrintSequence>("print_sequence") == PrintSequence::ByObject) {
|
||||
auto printer_structure_opt = wxGetApp().preset_bundle->printers.get_edited_preset().config.option<ConfigOptionEnum<PrinterStructure>>("printer_structure");
|
||||
if (printer_structure_opt && printer_structure_opt->value == PrinterStructure::psI3) {
|
||||
wxString msg_text = _(L("When print by object, machines with I3 structure will not generate timelapse videos."));
|
||||
msg_text += "\n\n" + _(L("Still print by object?"));
|
||||
|
||||
MessageDialog dialog(wxGetApp().plater(), msg_text, "", wxICON_WARNING | wxYES | wxNO);
|
||||
auto answer = dialog.ShowModal();
|
||||
if (answer == wxID_NO) {
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
new_conf.set_key_value("print_sequence", new ConfigOptionEnum<PrintSequence>(PrintSequence::ByLayer));
|
||||
m_config_manipulation.apply(m_config, &new_conf);
|
||||
wxGetApp().plater()->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// BBS set support style to default when support type changes
|
||||
if (opt_key == "support_type") {
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
|
|
Loading…
Reference in New Issue