From 458ff13024fde1e5569f4044256c0053a46e7fa9 Mon Sep 17 00:00:00 2001 From: tao wang Date: Tue, 13 Dec 2022 17:26:08 +0800 Subject: [PATCH] ENH:remind user rebind the printer when get wrong access code Change-Id: I4eeb139d282a120e6646e29d832f14431cfd72f0 --- src/slic3r/GUI/Jobs/SendJob.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Jobs/SendJob.cpp b/src/slic3r/GUI/Jobs/SendJob.cpp index 27369b7b0..22f7661ab 100644 --- a/src/slic3r/GUI/Jobs/SendJob.cpp +++ b/src/slic3r/GUI/Jobs/SendJob.cpp @@ -279,7 +279,7 @@ void SendJob::process() if (result < 0) { if (result == BAMBU_NETWORK_ERR_FTP_LOGIN_DENIED) { - msg_text = upload_failed_str; + msg_text = upload_login_failed_str; } if (result == BAMBU_NETWORK_ERR_FILE_NOT_EXIST) { msg_text = file_is_not_exists_str; } else if (result == BAMBU_NETWORK_ERR_FILE_OVER_SIZE) { @@ -299,8 +299,17 @@ void SendJob::process() } else { update_status(curr_percent, failed_in_cloud_service_str); } - if (!error_text.IsEmpty()) - msg_text += wxString::Format("[%s]", error_text); + + if (!error_text.IsEmpty()) { + if (result == BAMBU_NETWORK_ERR_FTP_LOGIN_DENIED) { + msg_text += ". "; + msg_text += _L("Please log out and login to the printer again."); + } + else { + msg_text += wxString::Format("[%s]", error_text); + } + } + update_status(curr_percent, msg_text); BOOST_LOG_TRIVIAL(error) << "send_job: failed, result = " << result; } else {