summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-21 14:54:55 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-21 14:54:55 -0500
commit37b04c150792bb3e53a5ba02c6631aa1d0f8686f (patch)
tree604f7b5f5593c7de0df245e8f92032f433ef477b /indra/newview/llinventorymodel.cpp
parenta68fefc4309754960152f5658638754dbf5bd142 (diff)
EXT-3582 : My Outfits populates from library if I delete my last outfit
Tracking a "Is this my first time in viewer2.0?" flag and only populating My Outfits folder if it's true.
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 0a8108899a..26a81ab084 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -67,6 +67,7 @@ F32 LLInventoryModel::sMaxTimeBetweenFetches = 10.f;
BOOL LLInventoryModel::sTimelyFetchPending = FALSE;
LLFrameTimer LLInventoryModel::sFetchTimer;
S16 LLInventoryModel::sBulkFetchCount = 0;
+BOOL LLInventoryModel::sFirstTimeInViewer2 = TRUE;
// Increment this if the inventory contents change in a non-backwards-compatible way.
// For viewer 2, the addition of link items makes a pre-viewer-2 cache incorrect.
@@ -2614,6 +2615,9 @@ void LLInventoryModel::buildParentChildMap()
notifyObservers();
}
}
+
+ const BOOL COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, FALSE) != LLUUID::null);
+ sFirstTimeInViewer2 = !COF_exists;
}
struct LLUUIDAndName
@@ -3530,6 +3534,19 @@ void LLInventoryModel::setLibraryOwnerID(const LLUUID& val)
mLibraryOwnerID = val;
}
+// static
+BOOL LLInventoryModel::getIsFirstTimeInViewer2()
+{
+ // Do not call this before parentchild map is built.
+ if (!gInventory.mIsAgentInvUsable)
+ {
+ llwarns << "Parent Child Map not yet built; guessing as first time in viewer2." << llendl;
+ return TRUE;
+ }
+
+ return sFirstTimeInViewer2;
+}
+
//----------------------------------------------------------------------------
// *NOTE: DEBUG functionality