ENH:Unable to send printing without selecting a device
jira:[STUDIO-6850] Change-Id: Ic537579727fd1618af364db93fce8fbbe4cd635a
This commit is contained in:
parent
a635619607
commit
9b9cf5f912
|
@ -685,6 +685,13 @@ void SendMultiMachinePage::on_send(wxCommandEvent& event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (print_params.size() <= 0) {
|
||||||
|
MessageDialog msg_wingow(nullptr, _L("There is no device available to send printing."), "", wxICON_WARNING | wxOK);
|
||||||
|
msg_wingow.ShowModal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (wxGetApp().getTaskManager()) {
|
if (wxGetApp().getTaskManager()) {
|
||||||
TaskSettings settings;
|
TaskSettings settings;
|
||||||
|
|
||||||
|
@ -703,6 +710,15 @@ void SendMultiMachinePage::on_send(wxCommandEvent& event)
|
||||||
|
|
||||||
settings.sending_interval = std::stoi(app_config->get("sending_interval")) * 60;
|
settings.sending_interval = std::stoi(app_config->get("sending_interval")) * 60;
|
||||||
settings.max_sending_at_same_time = std::stoi(app_config->get("max_send"));
|
settings.max_sending_at_same_time = std::stoi(app_config->get("max_send"));
|
||||||
|
|
||||||
|
if (settings.max_sending_at_same_time <= 0) {
|
||||||
|
MessageDialog msg_wingow(nullptr, _L("The number of printers in use simultaneously cannot be equal to 0."), "", wxICON_WARNING | wxOK);
|
||||||
|
msg_wingow.ShowModal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxGetApp().getTaskManager()->start_print(print_params, &settings);
|
wxGetApp().getTaskManager()->start_print(print_params, &settings);
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
|
Loading…
Reference in New Issue