Skip to content

Commit

Permalink
BUG: Cancel download study in the downloaded files processor with WAD…
Browse files Browse the repository at this point in the history
…O-URI when the download is cancelled or finishes with error without anything downloaded. #2866
  • Loading branch information
Woundorf committed Jul 29, 2022
1 parent d3ce5f9 commit 1903c11
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions starviewer/src/inputoutput/wadourirequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,15 @@ void WadoUriRequest::onReplyFinished(QNetworkReply *reply)
}
}
}
else if (m_status != Status::Cancelled)
else
{
m_status = Status::Errored;
m_errorsDescription = tr("Could not download any image. Errors:\n\n") + m_errorsDescription;
m_downloadedFilesProcessor->cancelDownloadStudy();

if (m_status != Status::Cancelled)
{
m_status = Status::Errored;
m_errorsDescription = tr("Could not download any image. Errors:\n\n") + m_errorsDescription;
}
}

m_errorsDescription = m_errorsDescription.trimmed(); // trim possible extra \n
Expand Down

0 comments on commit 1903c11

Please sign in to comment.