From 614a0ab6bd899abe06f5b9f25ac36f44966702f0 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 3 Jul 2014 10:50:31 +0300 Subject: MAINT-2570 FIXED Don't allow attaching or opening items from Merchant Outbox. --- indra/newview/llinventorybridge.h | 6 +++++- indra/newview/llinventorypanel.cpp | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 7dac830098..833fbbadbb 100755 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -158,7 +158,7 @@ protected: BOOL isAgentInventory() const; // false if lost or in the inventory library BOOL isCOFFolder() const; // true if COF or descendant of BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox - BOOL isOutboxFolder() const; // true if COF or descendant of marketplace outbox + BOOL isOutboxFolderDirectParent() const; const LLUUID getOutboxFolder() const; @@ -172,6 +172,10 @@ protected: const LLUUID& new_parent, BOOL restamp); void removeBatchNoCheck(std::vector& batch); + +public: + BOOL isOutboxFolder() const; // true if COF or descendant of marketplace outbox + protected: LLHandle mInventoryPanel; LLFolderView* mRoot; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4cb724e9c4..adfdfebae7 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1403,6 +1403,17 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) // Open selected items if enter key hit on the inventory panel if (mask == MASK_NONE) { + //Don't allow attaching or opening items from Merchant Outbox + LLFolderViewItem* folder_item = mFolderRoot.get()->getCurSelectedItem(); + if(folder_item) + { + LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem(); + if(bridge && bridge->isOutboxFolder() && (bridge->getInventoryType() != LLInventoryType::IT_CATEGORY)) + { + return handled; + } + } + LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "open"); handled = TRUE; } -- cgit v1.2.3