summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-03 16:08:44 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-03 16:08:44 +0000
commita171848fd4fed2fe915bcb42de96359112cf95e1 (patch)
tree5f4d85f4469f2d737864b3a07b367fa81040f3a3 /indra/newview/llinventorybridge.cpp
parentcc5920bed7790db49a062fb98ce54191f06ed98c (diff)
parentfc70ca5403acdd99b2235dbf4e513a4dd806c850 (diff)
merge from viewer2.
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 5d3142459a..c22eca037d 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3788,6 +3788,21 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode
gInventory.updateItem(item);
gInventory.notifyObservers();
}
+ else if("play" == action)
+ {
+ if(!LLGestureManager::instance().isGestureActive(mUUID))
+ {
+ // we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList.
+ BOOL inform_server = TRUE;
+ BOOL deactivate_similar = FALSE;
+ LLGestureManager::instance().setGestureLoadedCallback(mUUID, boost::bind(&LLGestureBridge::playGesture, mUUID));
+ LLGestureManager::instance().activateGestureWithAsset(mUUID, gInventory.getItem(mUUID)->getAssetUUID(), inform_server, deactivate_similar);
+ }
+ else
+ {
+ playGesture(mUUID);
+ }
+ }
else LLItemBridge::performAction(folder, model, action);
}
@@ -3873,6 +3888,20 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
hide_context_entries(menu, items, disabled_items);
}
+// static
+void LLGestureBridge::playGesture(const LLUUID& item_id)
+{
+ if (LLGestureManager::instance().isGesturePlaying(item_id))
+ {
+ LLGestureManager::instance().stopGesture(item_id);
+ }
+ else
+ {
+ LLGestureManager::instance().playGesture(item_id);
+ }
+}
+
+
// +=================================================+
// | LLAnimationBridge |
// +=================================================+
@@ -4649,6 +4678,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
case LLAssetType::AT_CLOTHING:
items.push_back(std::string("Take Off"));
+ // Fallthrough since clothing and bodypart share wear options
case LLAssetType::AT_BODYPART:
if (get_is_item_worn(item->getUUID()))
{