FIX:fixed the invisibility of the cancel button when sending fails

Change-Id: I32e9cf0c5846565a3bc9155c57289be9df148bde
This commit is contained in:
tao wang authored and Lane.Wei committed 2023-04-17 15:39:02 +08:00
1 parent 40068156fe
commit d57931eacd
12 files changed
+46 -22

No files matched your search

+9 -2
View File
@@ -401,7 +401,6 @@ void PrintJob::process()
msg_text = timeout_to_upload_str;
} else if (result == BAMBU_NETWORK_ERR_INVALID_RESULT) {
msg_text = _L("Failed to send the print job. Please try again.");
this->show_networking_test();
} else if (result == BAMBU_NETWORK_ERR_FTP_UPLOAD_FAILED) {
msg_text = _L("Failed to send the print job. Please try again.");
} else {
@@ -411,7 +410,15 @@ void PrintJob::process()
curr_percent = 0;
msg_text += wxString::Format("[%d][%s]", result, error_text);
}
update_status(curr_percent, msg_text);
if (result == BAMBU_NETWORK_ERR_INVALID_RESULT) {
this->show_networking_test(msg_text);
}
else {
update_status(curr_percent, msg_text);
}
BOOST_LOG_TRIVIAL(error) << "print_job: failed, result = " << result;
} else {
BOOST_LOG_TRIVIAL(error) << "print_job: send ok.";