From 16a30929f9b12359658d0f462b6bac25ed9a36fb Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Fri, 5 Mar 2010 13:17:31 -0600
Subject: [PATCH] Inventory now updates appropriately when using model
 uploader.

---
 indra/newview/llassetuploadresponders.cpp | 16 +---------------
 indra/newview/llviewermenufile.h          | 11 +++++++++++
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index a0be6efdc25..9a66bae2473 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -73,7 +73,7 @@ static const S32 FILE_COUNT_DISPLAY_THRESHOLD = 5;
 
 void dialog_refresh_all();
 
-static void on_new_single_inventory_upload_complete(
+void on_new_single_inventory_upload_complete(
 	LLAssetType::EType asset_type,
 	LLInventoryType::EType inventory_type,
 	const std::string inventory_type_string,
@@ -94,11 +94,6 @@ static void on_new_single_inventory_upload_complete(
 		LLNotificationsUtil::add("UploadPayment", args);
 	}
 
-	// Actually add the upload to viewer inventory
-	llinfos << "Adding " << server_response["new_inventory_item"].asUUID()
-			<< " " << server_response["new_asset"].asUUID()
-			<< " to inventory." << llendl;
-
 	if( item_folder_id.notNull() )
 	{
 		U32 everyone_perms = PERM_NONE;
@@ -165,15 +160,6 @@ static void on_new_single_inventory_upload_complete(
 				server_response["new_inventory_item"].asUUID(),
 				TAKE_FOCUS_NO);
 
-			if(
-				(LLAssetType::AT_TEXTURE == asset_type ||
-				 LLAssetType::AT_SOUND == asset_type) &&
-				(LLFilePicker::instance().getFileCount() <=
-				 FILE_COUNT_DISPLAY_THRESHOLD) )
-			{
-				panel->openSelected();
-			}
-
 			// restore keyboard focus
 			gFocusMgr.setKeyboardFocus(focus);
 		}
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 7ffa5d5e574..e700b0565ee 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -110,4 +110,15 @@ LLSD generate_new_resource_upload_capability_body(
 	U32 group_perms,
 	U32 everyone_perms);
 
+void on_new_single_inventory_upload_complete(
+	LLAssetType::EType asset_type,
+	LLInventoryType::EType inventory_type,
+	const std::string inventory_type_string,
+	const LLUUID& item_folder_id,
+	const std::string& item_name,
+	const std::string& item_description,
+	const LLSD& server_response,
+	S32 upload_price);
+
+
 #endif
-- 
GitLab