FIX: [STUDIO-3736] show download failed dialog & cancel task

Change-Id: I25830b29ffaaced26fcee8290ccfcce590e3963a
This commit is contained in:
chunmao.guo
2023-08-09 11:09:20 +08:00
committed by Lane.Wei
parent c288f26645
commit ed82262ca8
2 changed files with 33 additions and 15 deletions

View File

@@ -313,6 +313,9 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
return;
int result = e.GetExtraLong();
if (result > 1 && !e.GetString().IsEmpty())
MessageDialog(this, e.GetString(), _L("Download failed"), wxOK | wxICON_ERROR).ShowModal();
NetworkAgent* agent = wxGetApp().getAgent();
if (result > 1 || result == 0) {
json j;