summaryrefslogtreecommitdiff
path: root/indra/newview/llgesturemgr.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2010-02-04 17:03:41 -0800
committerCallum Prentice <callum@lindenlab.com>2010-02-04 17:03:41 -0800
commit259fa5fd0b67459145eb5463d79f37271ee7af0a (patch)
tree27c7eaddb0c6f7dd406228e3a61fc89b6fedb159 /indra/newview/llgesturemgr.cpp
parent80139d95adbcb2258c5541a4e0ace32f32b78ba5 (diff)
parenta4aed31ad9fd1874b134af87145ec93b283dbbfb (diff)
Merge with tip
Diffstat (limited to 'indra/newview/llgesturemgr.cpp')
-rw-r--r--indra/newview/llgesturemgr.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 82293b4aa0..0ba7bdf613 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -98,6 +98,41 @@ void LLGestureManager::init()
// TODO
}
+void LLGestureManager::changed(U32 mask)
+{
+ LLInventoryFetchObserver::changed(mask);
+
+ if (mask & LLInventoryObserver::GESTURE)
+ {
+ // If there was a gesture label changed, update all the names in the
+ // active gestures and then notify observers
+ if (mask & LLInventoryObserver::LABEL)
+ {
+ for(item_map_t::iterator it = mActive.begin(); it != mActive.end(); ++it)
+ {
+ if(it->second)
+ {
+ LLViewerInventoryItem* item = gInventory.getItem(it->first);
+ if(item)
+ {
+ it->second->mName = item->getName();
+ }
+ }
+ }
+ notifyObservers();
+ }
+ // If there was a gesture added or removed notify observers
+ // STRUCTURE denotes that the inventory item has been moved
+ // In the case of deleting gesture, it is moved to the trash
+ else if(mask & LLInventoryObserver::ADD ||
+ mask & LLInventoryObserver::REMOVE ||
+ mask & LLInventoryObserver::STRUCTURE)
+ {
+ notifyObservers();
+ }
+ }
+}
+
// Use this version when you have the item_id but not the asset_id,
// and you KNOW the inventory is loaded.