summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-02-08 19:06:20 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-02-08 19:06:20 +0200
commitc8d8414b3b2e83fbaffd6e48f55ca14a3cb27ca4 (patch)
treedf7462dc694598ea85223288a64997b88ad1913a /indra
parent43327798dec61590dc256697771e0423eb1ece9c (diff)
SL-10509 EEP Settings Picker gets closed by drag&drop
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llfolderview.cpp2
-rw-r--r--indra/llui/llfolderview.h3
-rw-r--r--indra/llui/llfolderviewitem.cpp1
-rw-r--r--indra/newview/llinventorypanel.cpp2
-rw-r--r--indra/newview/llinventorypanel.h3
-rw-r--r--indra/newview/llplacesinventorypanel.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/floater_settings_picker.xml2
7 files changed, 14 insertions, 0 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 9d0f4b6db1..e38c5c1ef3 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -148,6 +148,7 @@ LLFolderView::Params::Params()
: title("title"),
use_label_suffix("use_label_suffix"),
allow_multiselect("allow_multiselect", true),
+ allow_drag("allow_drag", true),
show_empty_message("show_empty_message", true),
suppress_folder_menu("suppress_folder_menu", false),
use_ellipses("use_ellipses", false),
@@ -163,6 +164,7 @@ LLFolderView::LLFolderView(const Params& p)
mScrollContainer( NULL ),
mPopupMenuHandle(),
mAllowMultiSelect(p.allow_multiselect),
+ mAllowDrag(p.allow_drag),
mShowEmptyMessage(p.show_empty_message),
mShowFolderHierarchy(FALSE),
mRenameItem( NULL ),
diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index 69824992c1..6bb5e6c02e 100644
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -90,6 +90,7 @@ public:
Optional<std::string> title;
Optional<bool> use_label_suffix,
allow_multiselect,
+ allow_drag,
show_empty_message,
use_ellipses,
show_item_link_overlays,
@@ -124,6 +125,7 @@ public:
void setReshapeCallback(const signal_t::slot_type& cb) { mReshapeSignal.connect(cb); }
bool getAllowMultiSelect() { return mAllowMultiSelect; }
+ bool getAllowDrag() { return mAllowDrag; }
// Close all folders in the view
void closeAllFolders();
@@ -274,6 +276,7 @@ protected:
selected_items_t mSelectedItems;
bool mKeyboardSelection,
mAllowMultiSelect,
+ mAllowDrag,
mShowEmptyMessage,
mShowFolderHierarchy,
mNeedsScroll,
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 0510e472c5..341399e980 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -557,6 +557,7 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
LLFolderView* root = getRoot();
if( (x - mDragStartX) * (x - mDragStartX) + (y - mDragStartY) * (y - mDragStartY) > drag_and_drop_threshold() * drag_and_drop_threshold()
+ && root->getAllowDrag()
&& root->getCurSelectedItem()
&& root->startDrag())
{
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 5f244ec6a2..c96760dd66 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -149,6 +149,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mInventory(p.inventory),
mAcceptsDragAndDrop(p.accepts_drag_and_drop),
mAllowMultiSelect(p.allow_multi_select),
+ mAllowDrag(p.allow_drag),
mShowItemLinkOverlays(p.show_item_link_overlays),
mShowEmptyMessage(p.show_empty_message),
mSuppressFolderMenu(p.suppress_folder_menu),
@@ -199,6 +200,7 @@ LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id )
p.grouped_item_model = mGroupedItemBridge;
p.use_label_suffix = mParams.use_label_suffix;
p.allow_multiselect = mAllowMultiSelect;
+ p.allow_drag = mAllowDrag;
p.show_empty_message = mShowEmptyMessage;
p.suppress_folder_menu = mSuppressFolderMenu;
p.show_item_link_overlays = mShowItemLinkOverlays;
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index b2a60543af..b55eb2b828 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -92,6 +92,7 @@ public:
Optional<std::string> sort_order_setting;
Optional<LLInventoryModel*> inventory;
Optional<bool> allow_multi_select;
+ Optional<bool> allow_drag;
Optional<bool> show_item_link_overlays;
Optional<Filter> filter;
Optional<StartFolder> start_folder;
@@ -111,6 +112,7 @@ public:
: sort_order_setting("sort_order_setting"),
inventory("", &gInventory),
allow_multi_select("allow_multi_select", true),
+ allow_drag("allow_drag", true),
show_item_link_overlays("show_item_link_overlays", false),
suppress_folder_menu("suppress_folder_menu", false),
filter("filter"),
@@ -263,6 +265,7 @@ protected:
LLInvPanelComplObserver* mCompletionObserver;
bool mAcceptsDragAndDrop;
bool mAllowMultiSelect;
+ bool mAllowDrag;
bool mShowItemLinkOverlays; // Shows link graphic over inventory item icons
bool mShowEmptyMessage;
bool mSuppressFolderMenu;
diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp
index 5eadd65884..a23830e8e1 100644
--- a/indra/newview/llplacesinventorypanel.cpp
+++ b/indra/newview/llplacesinventorypanel.cpp
@@ -78,6 +78,7 @@ LLFolderView * LLPlacesInventoryPanel::createFolderRoot(LLUUID root_id )
p.view_model = &mInventoryViewModel;
p.use_label_suffix = mParams.use_label_suffix;
p.allow_multiselect = mAllowMultiSelect;
+ p.allow_drag = mAllowDrag;
p.show_empty_message = mShowEmptyMessage;
p.show_item_link_overlays = mShowItemLinkOverlays;
p.root = NULL;
diff --git a/indra/newview/skins/default/xui/en/floater_settings_picker.xml b/indra/newview/skins/default/xui/en/floater_settings_picker.xml
index 55a1b540b4..132d23492f 100644
--- a/indra/newview/skins/default/xui/en/floater_settings_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_settings_picker.xml
@@ -76,6 +76,8 @@
bg_alpha_color="DkGray2">
<asset_filtered_inv_panel
allow_multi_select="false"
+ allow_drag="false"
+ accepts_drag_and_drop="false"
suppress_folder_menu="true"
bg_visible="true"
bg_alpha_color="DkGray2"