FIX: print by object not support timelapse for I3

Jira: XXXX
Change-Id: I8354971843f1e020db0f6407348cfa220ad514f2
(cherry picked from commit 8e8d0c47bdc7f60be901575b1202a1fc0e1942db)
This commit is contained in:
zhimin.zeng
2023-09-14 17:51:58 +08:00
committed by Lane.Wei
parent 3225a1965d
commit d462a4af8e
8 changed files with 87 additions and 7 deletions

View File

@@ -321,6 +321,26 @@ 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"))