summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitobserver.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-06-11 08:15:09 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-06-11 08:15:09 +0100
commit866961d4b3426114c306e158b50fe3a91b45021d (patch)
tree2faed81beaa45b8662ba3b406039ea547a6297e8 /indra/newview/lloutfitobserver.cpp
parentfc6d238884f06951a413004b46569304a9d9280a (diff)
parent99bf3245bd89afebcf1d00bf45d5367c1a83bee1 (diff)
merge from PE's viewer-release
Diffstat (limited to 'indra/newview/lloutfitobserver.cpp')
-rw-r--r--indra/newview/lloutfitobserver.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/indra/newview/lloutfitobserver.cpp b/indra/newview/lloutfitobserver.cpp
index 5652a98981..efa01bade9 100644
--- a/indra/newview/lloutfitobserver.cpp
+++ b/indra/newview/lloutfitobserver.cpp
@@ -74,6 +74,16 @@ S32 LLOutfitObserver::getCategoryVersion(const LLUUID& cat_id)
return cat->getVersion();
}
+// static
+const std::string& LLOutfitObserver::getCategoryName(const LLUUID& cat_id)
+{
+ LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
+ if (!cat)
+ return LLStringUtil::null;
+
+ return cat->getName();
+}
+
bool LLOutfitObserver::checkCOF()
{
LLUUID cof = LLAppearanceMgr::getInstance()->getCOF();
@@ -105,8 +115,11 @@ void LLOutfitObserver::checkBaseOutfit()
return;
const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id);
+ const std::string& baseoutfit_name = getCategoryName(baseoutfit_id);
- if (baseoutfit_ver == mBaseOutfitLastVersion)
+ if (baseoutfit_ver == mBaseOutfitLastVersion
+ // renaming category doesn't change version, so it's need to check it
+ && baseoutfit_name == mLastBaseOutfitName)
return;
}
else
@@ -116,10 +129,11 @@ void LLOutfitObserver::checkBaseOutfit()
if (baseoutfit_id.isNull())
return;
-
- mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId);
}
+ mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId);
+ mLastBaseOutfitName = getCategoryName(baseoutfit_id);
+
LLAppearanceMgr& app_mgr = LLAppearanceMgr::instance();
// dirtiness state should be updated before sending signal
app_mgr.updateIsDirty();