summaryrefslogtreecommitdiff
path: root/indra/llui
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/llui
parent43327798dec61590dc256697771e0423eb1ece9c (diff)
SL-10509 EEP Settings Picker gets closed by drag&drop
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderview.cpp2
-rw-r--r--indra/llui/llfolderview.h3
-rw-r--r--indra/llui/llfolderviewitem.cpp1
3 files changed, 6 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())
{