ENH: support command error dialog; support clean print error; support stop ams drying

JIRA: [STUDIO-12441] [STUDIO-13123] [STUDIO-12372]
Change-Id: I87170f1f51c1e24f6eee61deb07d06ff6b53a884
(cherry picked from commit 1ec5382f14ebf06d8f3ed128e377243665434ca6)
This commit is contained in:
xin.zhang
2025-07-03 15:20:57 +08:00
committed by Noisyfox
parent 0721078177
commit a5c6450cc5
12 changed files with 603 additions and 5 deletions

View File

@@ -2724,6 +2724,12 @@ void StatusPanel::show_error_message(MachineObject *obj, bool is_exist, wxString
m_print_error_dlg->update_title_style(_L("Error"), used_button, this);
m_print_error_dlg->update_text_image(msg, print_error_str, image_url);
m_print_error_dlg->Bind(wxEVT_CLOSE_WINDOW, [this, dev_id](wxCloseEvent& e)
{
MachineObject *the_obj = wxGetApp().getDeviceManager()->get_my_machine(dev_id);
if (the_obj) { the_obj->command_clean_print_error_uiop(the_obj->print_error); }
e.Skip();
});
m_print_error_dlg->on_show();
}
else {
@@ -2760,7 +2766,17 @@ void StatusPanel::show_error_message(MachineObject *obj, bool is_exist, wxString
m_print_error_dlg_no_action->update_text(error_code_msg);
m_print_error_dlg_no_action->Bind(EVT_SECONDARY_CHECK_CONFIRM, [this, dev_id](wxCommandEvent &e) {
MachineObject *the_obj = wxGetApp().getDeviceManager()->get_my_machine(dev_id);
if (the_obj) { the_obj->command_clean_print_error(the_obj->subtask_id_, the_obj->print_error); }
if (the_obj) {
the_obj->command_clean_print_error(the_obj->subtask_id_, the_obj->print_error);
the_obj->command_clean_print_error_uiop(the_obj->print_error);
}
});
m_print_error_dlg_no_action->Bind(wxEVT_CLOSE_WINDOW, [this, dev_id](wxCloseEvent& e)
{
MachineObject *the_obj = wxGetApp().getDeviceManager()->get_my_machine(dev_id);
if (the_obj) { the_obj->command_clean_print_error_uiop(the_obj->print_error); }
e.Skip();
});
m_print_error_dlg_no_action->Bind(EVT_SECONDARY_CHECK_RETRY, [this](wxCommandEvent& e) {
@@ -4678,7 +4694,7 @@ void StatusPanel::on_print_error_dlg_btn_clicked(wxCommandEvent& event)
break;
}
case Slic3r::GUI::PrintErrorDialog::CHECK_ASSISTANT: {
wxGetApp().mainframe->m_monitor->jump_to_HMS(event); // go to assistant page
wxGetApp().mainframe->m_monitor->jump_to_HMS(); // go to assistant page
break;
}
case Slic3r::GUI::PrintErrorDialog::FILAMENT_EXTRUDED: {
@@ -4734,6 +4750,10 @@ void StatusPanel::on_print_error_dlg_btn_clicked(wxCommandEvent& event)
obj->command_ams_control("resume");
break;
}
case Slic3r::GUI::PrintErrorDialog::STOP_DRYING: {
obj->command_ams_drying_stop();
break;
}
case Slic3r::GUI::PrintErrorDialog::ERROR_BUTTON_COUNT: break;
default: break;
}