summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llinventorypanel.cpp26
-rw-r--r--indra/newview/llinventorypanel.h5
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml5
-rw-r--r--indra/newview/skins/default/xui/en/widgets/inventory_panel.xml11
4 files changed, 29 insertions, 18 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;
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index cfb84bf4b7..8635ebc5c8 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -86,6 +86,7 @@ public:
Optional<bool> use_label_suffix;
Optional<bool> show_load_status;
Optional<LLScrollContainer::Params> scroll;
+ Optional<bool> accepts_drag_and_drop;
Params()
: sort_order_setting("sort_order_setting"),
@@ -96,7 +97,8 @@ public:
start_folder("start_folder"),
use_label_suffix("use_label_suffix", true),
show_load_status("show_load_status"),
- scroll("scroll")
+ scroll("scroll"),
+ accepts_drag_and_drop("accepts_drag_and_drop")
{}
};
@@ -181,6 +183,7 @@ protected:
LLInventoryModel* mInventory;
LLInventoryObserver* mInventoryObserver;
LLInvPanelComplObserver* mCompletionObserver;
+ BOOL mAcceptsDragAndDrop;
BOOL mAllowMultiSelect;
BOOL mShowItemLinkOverlays; // Shows link graphic over inventory item icons
BOOL mShowLoadStatus;
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 888230a00e..e6c5110999 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -82,10 +82,11 @@
left="0"
name="All Items"
sort_order_setting="InventorySortOrder"
- show_item_link_overlays="true"
+ show_item_link_overlays="true"
top="16"
width="288" />
<recent_inventory_panel
+ accepts_drag_and_drop="false"
bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"
background_visible="true"
@@ -99,7 +100,7 @@
layout="topleft"
left_delta="0"
name="Recent Items"
- show_item_link_overlays="true"
+ show_item_link_overlays="true"
width="290" />
</tab_container>
<layout_stack
diff --git a/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml b/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml
index 00f4c43915..eaf148c5e4 100644
--- a/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inventory_panel.xml
@@ -4,11 +4,12 @@
background_visible="true"
background_opaque="true"
show_load_status="true"
+ accepts_drag_and_drop="true"
>
<scroll
- name="Inventory Scroller"
- follows="all"
- reserve_scroll_corner="true"
- tab_stop="true"
- />
+ name="Inventory Scroller"
+ follows="all"
+ reserve_scroll_corner="true"
+ tab_stop="true"
+ />
</panel>