From dd42e27400cf7838bf9628abef76eb32c4150097 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Fri, 24 Apr 2015 13:06:35 +0300
Subject: [PATCH]  MAINT-2577 FIXED Cannot detach wearables by pressing Enter
 in inventory

---
 indra/newview/llinventorybridge.cpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1dc55585550..a160d88b7d2 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -5673,12 +5673,8 @@ void LLWearableBridge::performAction(LLInventoryModel* model, std::string action
 
 void LLWearableBridge::openItem()
 {
-	LLViewerInventoryItem* item = getItem();
-
-	if (item)
-	{
-		LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel());
-	}
+	performAction(getInventoryModel(),
+			      get_is_item_worn(mUUID) ? "take_off" : "wear");
 }
 
 void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
-- 
GitLab