From 73c1e41ae57ff80ff143d4784e7b1dc5e7b5c37f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 14 Oct 2014 19:59:18 +0300 Subject: MAINT-4301 FIXED failed script upload makes the wait cursor stick --- indra/newview/llassetuploadresponders.cpp | 41 +++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 7 deletions(-) (limited to 'indra/newview/llassetuploadresponders.cpp') diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index a98ff64d0a..466677b8be 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -229,21 +229,34 @@ void LLAssetUploadResponder::httpFailure() { // *TODO: Add adaptive retry policy? LL_WARNS() << dumpResponse() << LL_ENDL; - LLSD args; + std::string reason; if (isHttpClientErrorStatus(getStatus())) { - args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); - args["REASON"] = "Error in upload request. Please visit " + reason = "Error in upload request. Please visit " "http://secondlife.com/support for help fixing this problem."; - LLNotificationsUtil::add("CannotUploadReason", args); } else { - args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); - args["REASON"] = "The server is experiencing unexpected " + reason = "The server is experiencing unexpected " "difficulties."; - LLNotificationsUtil::add("CannotUploadReason", args); } + LLSD args; + args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); + args["REASON"] = reason; + LLNotificationsUtil::add("CannotUploadReason", args); + + // unfreeze script preview + if(mAssetType == LLAssetType::AT_LSL_TEXT) + { + LLPreviewLSL* preview = LLFloaterReg::findTypedInstance("preview_script", mPostData["item_id"]); + if (preview) + { + LLSD errors; + errors.append(LLTrans::getString("UploadFailed") + reason); + preview->callbackLSLCompileFailed(errors); + } + } + LLUploadDialog::modalUploadFinished(); LLFilePicker::instance().reset(); // unlock file picker when bulk upload fails } @@ -298,8 +311,22 @@ void LLAssetUploadResponder::uploadUpload(const LLSD& content) void LLAssetUploadResponder::uploadFailure(const LLSD& content) { LL_WARNS() << dumpResponse() << LL_ENDL; + + // unfreeze script preview + if(mAssetType == LLAssetType::AT_LSL_TEXT) + { + LLPreviewLSL* preview = LLFloaterReg::findTypedInstance("preview_script", mPostData["item_id"]); + if (preview) + { + LLSD errors; + errors.append(LLTrans::getString("UploadFailed") + content["message"].asString()); + preview->callbackLSLCompileFailed(errors); + } + } + // remove the "Uploading..." message LLUploadDialog::modalUploadFinished(); + LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot"); if (floater_snapshot) { -- cgit v1.2.3 From 811878df666f5a115d7715639d618877ed4de44a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 5 Nov 2014 17:52:14 +0200 Subject: MAINT-202 FIXED Can't open scripts in copied objects individually on the viewer2 --- indra/newview/llassetuploadresponders.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llassetuploadresponders.cpp') diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 466677b8be..02e88a8b89 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -652,7 +652,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content) } else { - LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance("preview_scriptedit", LLSD(item_id)); + LLSD floater_key; + floater_key["taskid"] = task_id; + floater_key["itemid"] = item_id; + LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance("preview_scriptedit", floater_key); if (preview) { // Bytecode save completed -- cgit v1.2.3