From 813bc232e7175ba3e20a70f16427d12c7681a996 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Mon, 9 Dec 2013 15:42:51 -0800
Subject: MAINT-3017 FIX Inventory filter for Recent tab does not persist
 between sessions as it used to. added names back to inventory filters, so
 they can be deserialized

---
 indra/newview/llconversationmodel.h        | 3 +++
 indra/newview/llfolderviewmodelinventory.h | 4 ++++
 indra/newview/llinventorypanel.cpp         | 3 ++-
 indra/newview/llpanelobjectinventory.cpp   | 3 ++-
 4 files changed, 11 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index d8cdcdfc97..dc74506c53 100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -291,6 +291,9 @@ class LLConversationViewModel
 {
 public:
 	typedef LLFolderViewModel<LLConversationSort, LLConversationItem, LLConversationItem, LLConversationFilter> base_t;
+	LLConversationViewModel() 
+	:	base_t(new LLConversationSort(), new LLConversationFilter())
+	{}
 	
 	void sort(LLFolderViewFolder* folder);
 	bool contentsReady() { return true; }	// *TODO : we need to check that participants names are available somewhat
diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h
index 9dcfdfa185..8772185ad0 100755
--- a/indra/newview/llfolderviewmodelinventory.h
+++ b/indra/newview/llfolderviewmodelinventory.h
@@ -105,6 +105,10 @@ class LLFolderViewModelInventory
 public:
 	typedef LLFolderViewModel<LLInventorySort,   LLFolderViewModelItemInventory, LLFolderViewModelItemInventory,   LLInventoryFilter> base_t;
 
+	LLFolderViewModelInventory(const std::string& name)
+	:	base_t(new LLInventorySort(), new LLInventoryFilter(LLInventoryFilter::Params().name(name)))
+	{}
+
 	void setTaskID(const LLUUID& id) {mTaskID = id;}
 
 	void sort(LLFolderViewFolder* folder);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index e5b9e11d48..d27f7d2527 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -146,7 +146,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
 	mShowItemLinkOverlays(p.show_item_link_overlays),
 	mShowEmptyMessage(p.show_empty_message),
 	mViewsInitialized(false),
-	mInvFVBridgeBuilder(NULL)
+	mInvFVBridgeBuilder(NULL),
+	mInventoryViewModel(p.name)
 {
 	mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
 
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index d7130820ab..bb063f48a5 100755
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1491,7 +1491,8 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
 	mFolders(NULL),
 	mHaveInventory(FALSE),
 	mIsInventoryEmpty(TRUE),
-	mInventoryNeedsUpdate(FALSE)
+	mInventoryNeedsUpdate(FALSE),
+	mInventoryViewModel(p.name)
 {
 	// Setup context menu callbacks
 	mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelObjectInventory::doToSelected, this, _2));
-- 
cgit v1.2.3