diff options
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
| -rw-r--r-- | indra/newview/llinventorybridge.cpp | 32 | 
1 files changed, 31 insertions, 1 deletions
| diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6c9c7d15be..f68550d8fd 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3773,6 +3773,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);  } @@ -3858,6 +3873,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                        |  // +=================================================+ @@ -4634,6 +4663,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()))  					{ @@ -5079,7 +5109,7 @@ void	LLLandmarkBridgeAction::doIt()  		payload["asset_id"] = item->getAssetUUID();		  		LLSD args;  -		args["LOCATION"] = item->getDisplayName();  +		args["LOCATION"] = item->getName();   		LLNotificationsUtil::add("TeleportFromLandmark", args, payload);  	} | 
