summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-09-13 11:17:02 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-09-13 11:17:02 -0700
commit201d0659192977071ff0fc2219a28ecbc3025171 (patch)
treeb7e0161cda7545624cac6ebc294001f25f3fb2c2 /indra/newview/llinventorypanel.cpp
parentba96fb5c2b6801398481a30189f991cff98fed8b (diff)
EXP-1071 FIX -- User can drag items to Received Items folder under Recent Tab
* Inventory panel now has an optional "accepts_drag_and_drop" parameter set to true by default. * Recent Inventory Panel sets "accepts_drag_and_drop" to false. * Items can still be dragged out of Recent to a second inventory panel. Reviewed by Leyla.
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 173e5c6ae6..615d3aefde 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -129,6 +129,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mScroller(NULL),
mSortOrderSetting(p.sort_order_setting),
mInventory(p.inventory),
+ mAcceptsDragAndDrop(p.accepts_drag_and_drop),
mAllowMultiSelect(p.allow_multi_select),
mShowItemLinkOverlays(p.show_item_link_overlays),
mShowLoadStatus(p.show_load_status),
@@ -824,19 +825,24 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
EAcceptance* accept,
std::string& tooltip_msg)
{
- BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ BOOL handled = FALSE;
- // If folder view is empty the (x, y) point won't be in its rect
- // so the handler must be called explicitly.
- // but only if was not handled before. See EXT-6746.
- if (!handled && !mFolderRoot->hasVisibleChildren())
+ if (mAcceptsDragAndDrop)
{
- handled = mFolderRoot->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
- }
+ handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
- if (handled)
- {
- mFolderRoot->setDragAndDropThisFrame();
+ // If folder view is empty the (x, y) point won't be in its rect
+ // so the handler must be called explicitly.
+ // but only if was not handled before. See EXT-6746.
+ if (!handled && !mFolderRoot->hasVisibleChildren())
+ {
+ handled = mFolderRoot->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ }
+
+ if (handled)
+ {
+ mFolderRoot->setDragAndDropThisFrame();
+ }
}
return handled;