mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
FIX: fix crash when close downloadingProgressDialog
Change-Id: Ie35bb83223d70d3d343f795bc449998a4df15500
This commit is contained in:
@@ -51,6 +51,8 @@ DownloadProgressDialog::DownloadProgressDialog(wxString title)
|
||||
Layout();
|
||||
Fit();
|
||||
CentreOnParent();
|
||||
|
||||
Bind(wxEVT_CLOSE_WINDOW, &DownloadProgressDialog::on_close, this);
|
||||
}
|
||||
|
||||
bool DownloadProgressDialog::Show(bool show)
|
||||
@@ -91,6 +93,15 @@ bool DownloadProgressDialog::Show(bool show)
|
||||
return DPIDialog::Show(show);
|
||||
}
|
||||
|
||||
void DownloadProgressDialog::on_close(wxCloseEvent& event)
|
||||
{
|
||||
if (m_upgrade_job) {
|
||||
m_upgrade_job->cancel();
|
||||
m_upgrade_job->join();
|
||||
}
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
DownloadProgressDialog::~DownloadProgressDialog() {}
|
||||
|
||||
void DownloadProgressDialog::on_dpi_changed(const wxRect &suggested_rect) {}
|
||||
|
||||
Reference in New Issue
Block a user