diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-07-03 10:50:31 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-07-03 10:50:31 +0300 |
commit | 614a0ab6bd899abe06f5b9f25ac36f44966702f0 (patch) | |
tree | 9f1739fd5dab1eb63f3f1dff44957b416c9a3ca9 /indra/newview | |
parent | b6710fe6b53c3266adbcea11d1ea7c4cb5cabcc1 (diff) |
MAINT-2570 FIXED Don't allow attaching or opening items from Merchant Outbox.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llinventorybridge.h | 6 | ||||
-rwxr-xr-x | indra/newview/llinventorypanel.cpp | 11 |
2 files changed, 16 insertions, 1 deletions
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<LLFolderViewModelItem*>& batch); + +public: + BOOL isOutboxFolder() const; // true if COF or descendant of marketplace outbox + protected: LLHandle<LLInventoryPanel> 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; } |