mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
FIX: fix crash when cancel print job
join print_job thread in prepare_mode() Change-Id: I5af749655f36ac5b67e3c29bd909bd67a71bfb55 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
97de939674
commit
f001092dc3
1 changed files with 8 additions and 0 deletions
|
@ -1035,6 +1035,12 @@ void SelectMachineDialog::update_select_layout(PRINTER_TYPE type)
|
|||
|
||||
void SelectMachineDialog::prepare_mode()
|
||||
{
|
||||
if (m_print_job) {
|
||||
m_print_job->join();
|
||||
}
|
||||
wxEndBusyCursor();
|
||||
Enable_Send_Button(true);
|
||||
|
||||
m_status_bar->reset();
|
||||
if (m_simplebook->GetSelection() != 0) {
|
||||
m_simplebook->SetSelection(0);
|
||||
|
@ -1430,6 +1436,8 @@ void SelectMachineDialog::on_cancel(wxCloseEvent &event)
|
|||
|
||||
void SelectMachineDialog::on_ok(wxCommandEvent &event)
|
||||
{
|
||||
Enable_Send_Button(false);
|
||||
|
||||
int result = 0;
|
||||
if (m_printer_last_select.empty()) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue