summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitobserver.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-07-21 14:14:42 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-07-21 14:14:42 +0300
commit4a999fe04414f5489c555dbd609e7bae1c2667d6 (patch)
treec93505b07bbd7ca68ed7239655c42e7316b17ecd /indra/newview/lloutfitobserver.cpp
parent52abfbbc4a3fbf55379fab861a1312eb5cecbc4d (diff)
parent842e5111ae2d0a83755ff902afa43dc84e45662b (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lloutfitobserver.cpp')
-rw-r--r--indra/newview/lloutfitobserver.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/lloutfitobserver.cpp b/indra/newview/lloutfitobserver.cpp
index 03414b9964..60c941b456 100644
--- a/indra/newview/lloutfitobserver.cpp
+++ b/indra/newview/lloutfitobserver.cpp
@@ -40,6 +40,7 @@
LLOutfitObserver::LLOutfitObserver() :
mCOFLastVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
{
+ mItemNameHash.finalize();
gInventory.addObserver(this);
}
@@ -87,13 +88,24 @@ bool LLOutfitObserver::checkCOF()
if (cof.isNull())
return false;
+ bool cof_changed = false;
+ LLMD5 item_name_hash = gInventory.hashDirectDescendentNames(cof);
+ if (item_name_hash != mItemNameHash)
+ {
+ cof_changed = true;
+ mItemNameHash = item_name_hash;
+ }
+
S32 cof_version = getCategoryVersion(cof);
+ if (cof_version != mCOFLastVersion)
+ {
+ cof_changed = true;
+ mCOFLastVersion = cof_version;
+ }
- if (cof_version == mCOFLastVersion)
+ if (!cof_changed)
return false;
-
- mCOFLastVersion = cof_version;
-
+
// dirtiness state should be updated before sending signal
LLAppearanceMgr::getInstance()->updateIsDirty();
mCOFChanged();