diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-25 16:50:21 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-25 16:50:21 -0800 |
commit | 5ed6e0720af1b6cdf1a983e2c040eeb5d8ae33ba (patch) | |
tree | 5d0141f43cfaf59e5cb62eb2f4ca9541160e6173 /indra/newview/llgesturemgr.cpp | |
parent | 3ab4b0f58326a01a09aa99f262c03d2703215af2 (diff) | |
parent | 6e932911d5b0a02b44caf3bf81a9c00fd0e1dc89 (diff) |
warn-on-failure:unix-eol
automated merge from trunk
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. |