mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: print by object not support timelapse for I3
Jira: XXXX Change-Id: I8354971843f1e020db0f6407348cfa220ad514f2
This commit is contained in:
parent
66d0f8ff71
commit
cdbbdafc59
8 changed files with 85 additions and 5 deletions
|
@ -1674,6 +1674,7 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj)
|
|||
&& obj->is_support_print_with_timelapse()
|
||||
&& is_show_timelapse()) {
|
||||
select_timelapse->Show();
|
||||
update_timelapse_enable_status();
|
||||
} else {
|
||||
select_timelapse->Hide();
|
||||
}
|
||||
|
@ -2158,6 +2159,17 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
|||
update_print_status_msg(msg_text, true, true);
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
} else if (status == PrintDialogStatus::PrintStatusTimelapseWarning) {
|
||||
int error_code = get_timelapse_warning_code();
|
||||
wxString msg_text;
|
||||
if (error_code & 1) {
|
||||
msg_text = _L("When enable spiral vase mode, machines with I3 structure will not generate timelapse videos.");
|
||||
} else if ((error_code >> 1) & 1) {
|
||||
msg_text = _L("When print by object, machines with I3 structure will not generate timelapse videos.");
|
||||
}
|
||||
update_print_status_msg(msg_text, true, true);
|
||||
Enable_Send_Button(true);
|
||||
Enable_Refresh_Button(true);
|
||||
}
|
||||
|
||||
// m_panel_warn m_simplebook
|
||||
|
@ -3185,6 +3197,11 @@ void SelectMachineDialog::update_show_status()
|
|||
}
|
||||
}
|
||||
|
||||
if (get_timelapse_warning_code() != 0) {
|
||||
show_status(PrintDialogStatus::PrintStatusTimelapseWarning);
|
||||
return;
|
||||
}
|
||||
|
||||
// no ams
|
||||
if (!obj_->has_ams() || !m_checkbox_list["use_ams"]->GetValue()) {
|
||||
if (!has_tips(obj_))
|
||||
|
@ -3251,6 +3268,29 @@ void SelectMachineDialog::update_show_status()
|
|||
}
|
||||
}
|
||||
|
||||
int SelectMachineDialog::get_timelapse_warning_code()
|
||||
{
|
||||
PartPlate *plate = m_plater->get_partplate_list().get_curr_plate();
|
||||
return plate->timelapse_warning_code();
|
||||
}
|
||||
|
||||
void SelectMachineDialog::update_timelapse_enable_status()
|
||||
{
|
||||
AppConfig *config = wxGetApp().app_config;
|
||||
if (get_timelapse_warning_code() == 0) {
|
||||
if (!config || config->get("print", "timelapse") == "0")
|
||||
m_checkbox_list["timelapse"]->SetValue(false);
|
||||
else
|
||||
m_checkbox_list["timelapse"]->SetValue(true);
|
||||
select_timelapse->Enable(true);
|
||||
} else {
|
||||
m_checkbox_list["timelapse"]->SetValue(false);
|
||||
select_timelapse->Enable(false);
|
||||
if (config) { config->set_str("print", "timelapse", "0"); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool SelectMachineDialog::is_show_timelapse()
|
||||
{
|
||||
auto compare_version = [](const std::string &version1, const std::string &version2) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue