summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-06 13:55:27 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-06 13:55:27 -0400
commitb1769b6a60954152111cc5d0f596ff21cce84ffa (patch)
tree5ada5fdcd106af603919365a4a5b212252255d58
parenta5e41af80978babb5e8046d390d6730f57423294 (diff)
SH-4234 FIX - the only persistent failure seen was caused by a broken link in the outfit. Modified updateIsDirty() to ignore broken links.
-rwxr-xr-xindra/newview/llappearancemgr.cpp19
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp7
-rwxr-xr-xindra/newview/llinventoryfunctions.h7
3 files changed, 32 insertions, 1 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 722587ec0e..2698e2db35 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2611,7 +2611,7 @@ void LLAppearanceMgr::updateIsDirty()
if (base_outfit.notNull())
{
- LLIsOfAssetType collector = LLIsOfAssetType(LLAssetType::AT_LINK);
+ LLIsValidItemLink collector;
LLInventoryModel::cat_array_t cof_cats;
LLInventoryModel::item_array_t cof_items;
@@ -2625,6 +2625,7 @@ void LLAppearanceMgr::updateIsDirty()
if(outfit_items.count() != cof_items.count())
{
+ LL_DEBUGS("Avatar") << "item count different" << llendl;
// Current outfit folder should have one more item than the outfit folder.
// this one item is the link back to the outfit folder itself.
mOutfitIsDirty = true;
@@ -2644,6 +2645,22 @@ void LLAppearanceMgr::updateIsDirty()
item1->getName() != item2->getName() ||
item1->getActualDescription() != item2->getActualDescription())
{
+ if (item1->getLinkedUUID() != item2->getLinkedUUID())
+ {
+ LL_DEBUGS("Avatar") << "link id different " << llendl;
+ }
+ else
+ {
+ if (item1->getName() != item2->getName())
+ {
+ LL_DEBUGS("Avatar") << "name different " << item1->getName() << " " << item2->getName() << llendl;
+ }
+ if (item1->getActualDescription() != item2->getActualDescription())
+ {
+ LL_DEBUGS("Avatar") << "desc different " << item1->getActualDescription()
+ << " " << item2->getActualDescription() << llendl;
+ }
+ }
mOutfitIsDirty = true;
return;
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index b5fb226872..faa5d70952 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -738,6 +738,13 @@ bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item
return FALSE;
}
+bool LLIsValidItemLink::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+{
+ LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item);
+ if (!vitem) return false;
+ return (vitem->getActualType() == LLAssetType::AT_LINK && !vitem->getIsBrokenLink());
+}
+
bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
if(mType == LLAssetType::AT_CATEGORY)
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index f1066a4dc9..6b3861aa79 100755
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -186,6 +186,13 @@ protected:
LLAssetType::EType mType;
};
+class LLIsValidItemLink : public LLInventoryCollectFunctor
+{
+public:
+ virtual bool operator()(LLInventoryCategory* cat,
+ LLInventoryItem* item);
+};
+
class LLIsTypeWithPermissions : public LLInventoryCollectFunctor
{
public: