From d079c11c99c381a3e9aae292e132c67f39d038ff Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 6 Nov 2023 15:28:26 +0200 Subject: SL-20565 Places floater -- allow dragging a folder into a folder (#491) --- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llplacesinventorypanel.cpp | 10 ++++++++++ indra/newview/llplacesinventorypanel.h | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 73005d6903..fddf5179fa 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2796,7 +2796,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, is_movable = can_move_folder_to_marketplace(master_folder, dest_folder, inv_cat, tooltip_msg, bundle_size); } - if (is_movable) + if (is_movable && !move_is_into_landmarks) { LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); is_movable = active_panel != NULL; diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index 1c14acd843..f3455bb4f0 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -120,3 +120,13 @@ S32 LLPlacesInventoryPanel::notify(const LLSD& info) } return 0; } + +BOOL LLPlacesInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, + EAcceptance *accept, std::string &tooltip_msg) +{ + if (mAcceptsDragAndDrop) + { + return LLInventoryPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } + return FALSE; +} diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h index 5629438415..467eee91af 100644 --- a/indra/newview/llplacesinventorypanel.h +++ b/indra/newview/llplacesinventorypanel.h @@ -53,6 +53,9 @@ public: virtual S32 notify(const LLSD& info) ; + BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, + EAcceptance *accept, std::string &tooltip_msg) override; + private: LLSaveFolderState* mSavedFolderState; }; -- cgit v1.2.3