FIX: Can do switch while printing pause
jira: [STUDIO-9789] Change-Id: I8d5d2195adcd2cd048d95303f0562f24b696e34e
This commit is contained in:
parent
151f40ad4d
commit
f3777db02d
|
@ -2808,6 +2808,11 @@ bool MachineObject::is_in_prepare()
|
|||
return print_status == "PREPARE";
|
||||
}
|
||||
|
||||
bool MachineObject::is_in_printing_pause() const
|
||||
{
|
||||
return print_status == "PAUSE";
|
||||
}
|
||||
|
||||
bool MachineObject::is_printing_finished()
|
||||
{
|
||||
if (print_status.compare("FINISH") == 0
|
||||
|
|
|
@ -1165,6 +1165,7 @@ public:
|
|||
bool can_pause();
|
||||
bool can_abort();
|
||||
bool is_in_printing();
|
||||
bool is_in_printing_pause() const;
|
||||
bool is_in_prepare();
|
||||
bool is_printing_finished();
|
||||
bool is_core_xy();
|
||||
|
|
|
@ -2832,7 +2832,8 @@ void StatusPanel::update_misc_ctrl(MachineObject *obj)
|
|||
}
|
||||
|
||||
/*enable status*/
|
||||
if (obj->is_in_printing() ||
|
||||
/* Can do switch while printing pause STUDIO-9789*/
|
||||
if ((obj->is_in_printing() && !obj->is_in_printing_pause()) ||
|
||||
obj->ams_status_main == AMS_STATUS_MAIN_FILAMENT_CHANGE ||
|
||||
targ_nozzle_id_from_pc != INVALID_NOZZLE_ID)
|
||||
{
|
||||
|
@ -4660,7 +4661,8 @@ void StatusPanel::on_nozzle_selected(wxCommandEvent &event)
|
|||
{
|
||||
if (obj) {
|
||||
|
||||
if (obj->is_in_printing() || obj->ams_status_main == AMS_STATUS_MAIN_FILAMENT_CHANGE) {
|
||||
/*Enable switch head while printing is paused STUDIO-9789*/
|
||||
if ((obj->is_in_printing() && !obj->is_in_printing_pause()) || obj->ams_status_main == AMS_STATUS_MAIN_FILAMENT_CHANGE) {
|
||||
MessageDialog dlg(nullptr, _L("The printer is busy on other print job"), _L("Error"), wxICON_WARNING | wxOK);
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue