diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-12-13 13:56:41 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-12-13 13:56:41 -0800 |
commit | d7fabfee19e536dd8df356fd4531437ccb3630d5 (patch) | |
tree | b5f66f4d24224ad4c85e8d259160d7c95dd2c833 /indra/newview/llfloateroutbox.cpp | |
parent | a96271e3c2958a95040a1348934bd3f056f374ab (diff) |
EXP-1715 FIX -- Merchant outbox drag and drop has offset between mouse position and selected folder
EXP-1717 FIX -- Drag and drop within the outbox can result in an item created at the top level of the outbox
Folders are now created for items dragged around within the merchant outbox if their drop target is the top level outbox inventory panel itself.
Diffstat (limited to 'indra/newview/llfloateroutbox.cpp')
-rw-r--r-- | indra/newview/llfloateroutbox.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index b15380d427..eb11933368 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -248,7 +248,7 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) mOutboxInventoryPanel->setShape(inventory_placeholder_rect); // Set the sort order newest to oldest - mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE); + mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME); mOutboxInventoryPanel->getFilter()->markDefault(); fetchOutboxContents(); @@ -340,19 +340,25 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* accept, std::string& tooltip_msg) { - // Pass drag and drop to this floater to the outbox inventory control - if ((mOutboxInventoryPanel == NULL) || (mWindowShade && mWindowShade->isShown()) || LLMarketplaceInventoryImporter::getInstance()->isImportInProgress()) { return FALSE; } - - S32 local_x = x - mOutboxInventoryPanel->getRect().mLeft; - S32 local_y = y - mOutboxInventoryPanel->getRect().mBottom; - - return mOutboxInventoryPanel->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + + BOOL handled = (childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL); + + // Pass drag and drop to this floater to the outbox inventory control if no other children handle it + if (!handled) + { + S32 local_x = x - mOutboxInventoryPanel->getRect().mLeft; + S32 local_y = y - mOutboxInventoryPanel->getRect().mBottom; + + handled = mOutboxInventoryPanel->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } + + return handled; } void LLFloaterOutbox::onImportButtonClicked() |