From c8d8414b3b2e83fbaffd6e48f55ca14a3cb27ca4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 8 Feb 2019 19:06:20 +0200 Subject: SL-10509 EEP Settings Picker gets closed by drag&drop --- indra/llui/llfolderview.cpp | 2 ++ indra/llui/llfolderview.h | 3 +++ indra/llui/llfolderviewitem.cpp | 1 + indra/newview/llinventorypanel.cpp | 2 ++ indra/newview/llinventorypanel.h | 3 +++ indra/newview/llplacesinventorypanel.cpp | 1 + indra/newview/skins/default/xui/en/floater_settings_picker.xml | 2 ++ 7 files changed, 14 insertions(+) (limited to 'indra') 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 title; Optional 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 sort_order_setting; Optional inventory; Optional allow_multi_select; + Optional allow_drag; Optional show_item_link_overlays; Optional filter; Optional 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">