NEW:write log when pausing or stopping printing tasks
Change-Id: I397fe6f5490d2599ce4bb81e32c64ae0f57eb3c0
This commit is contained in:
parent
0c8245a76c
commit
f6049a2295
|
@ -1567,10 +1567,14 @@ void StatusPanel::on_market_scoring(wxCommandEvent &event) {
|
||||||
void StatusPanel::on_subtask_pause_resume(wxCommandEvent &event)
|
void StatusPanel::on_subtask_pause_resume(wxCommandEvent &event)
|
||||||
{
|
{
|
||||||
if (obj) {
|
if (obj) {
|
||||||
if (obj->can_resume())
|
if (obj->can_resume()) {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "monitor: resume current print task dev_id =" << obj->dev_id;
|
||||||
obj->command_task_resume();
|
obj->command_task_resume();
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "monitor: pause current print task dev_id =" << obj->dev_id;
|
||||||
obj->command_task_pause();
|
obj->command_task_pause();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1579,7 +1583,10 @@ void StatusPanel::on_subtask_abort(wxCommandEvent &event)
|
||||||
if (abort_dlg == nullptr) {
|
if (abort_dlg == nullptr) {
|
||||||
abort_dlg = new SecondaryCheckDialog(this->GetParent(), wxID_ANY, _L("Cancel print"));
|
abort_dlg = new SecondaryCheckDialog(this->GetParent(), wxID_ANY, _L("Cancel print"));
|
||||||
abort_dlg->Bind(EVT_SECONDARY_CHECK_CONFIRM, [this](wxCommandEvent &e) {
|
abort_dlg->Bind(EVT_SECONDARY_CHECK_CONFIRM, [this](wxCommandEvent &e) {
|
||||||
if (obj) obj->command_task_abort();
|
if (obj) {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "monitor: stop current print task dev_id =" << obj->dev_id;
|
||||||
|
obj->command_task_abort();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
abort_dlg->update_text(_L("Are you sure you want to cancel this print?"));
|
abort_dlg->update_text(_L("Are you sure you want to cancel this print?"));
|
||||||
|
|
Loading…
Reference in New Issue