diff options
author | Rick Pasetto <rick@lindenlab.com> | 2010-01-22 10:02:13 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2010-01-22 10:02:13 -0800 |
commit | fa891c062ef66410123c66de1ef67b7dcef327db (patch) | |
tree | d0badf37ffd261c6732744be03ab76cabf523c5e /indra/newview/llgesturemgr.cpp | |
parent | 84dfa02baf4aff336ec467acbe647618e9b4b21a (diff) | |
parent | dc47f52e9f5ab095737fedf68d22c8228140c71b (diff) |
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0
Diffstat (limited to 'indra/newview/llgesturemgr.cpp')
-rw-r--r-- | indra/newview/llgesturemgr.cpp | 35 |
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. |