FIX: disable send print while the ams is during setting up

jira: [STUDIO-9813]
Change-Id: I55dcca9aab4a9923636c1cf7a0a27bc7e4b9586d
(cherry picked from commit 5b800d034266489e5b288aa7a51ce6d244ae06b8)
This commit is contained in:
xin.zhang
2025-01-16 14:52:49 +08:00
committed by Noisyfox
parent c8fa5e1e4e
commit b63e0ee556
4 changed files with 30 additions and 1 deletions

View File

@@ -1743,6 +1743,10 @@ 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::PrintStatusAmsOnSettingup) {
update_print_status_msg(_L("AMS is setting up. Please try again later."), false, false);
Enable_Send_Button(false);
Enable_Refresh_Button(true);
} else if (status == PrintDialogStatus::PrintStatusDisableAms) {
update_print_status_msg(wxEmptyString, false, false);
Enable_Send_Button(true);
@@ -1756,7 +1760,7 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
update_print_status_msg(msg_text, true, false);
Enable_Send_Button(false);
Enable_Refresh_Button(true);
} else if (status == PrintDialogStatus::PrintStatusAmsMappingSuccess){
} else if (status == PrintDialogStatus::PrintStatusAmsMappingSuccess){
wxString msg_text = _L("Filaments to AMS slots mappings have been established. You can click a filament above to change its mapping AMS slot");
update_print_status_msg(msg_text, false, false);
Enable_Send_Button(true);
@@ -3347,6 +3351,12 @@ void SelectMachineDialog::update_show_status()
}
// check ams and vt_slot mix use status
if (obj_->is_ams_on_settingup())
{
show_status(PrintDialogStatus::PrintStatusAmsOnSettingup);
return;
}
struct ExtruderStatus
{
bool has_ams{false};