From d2ade35b0914f86b1c0239dbf40f5d5972a11b07 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 28 Nov 2023 14:08:23 +0200 Subject: SL-20651 DragnDrop from library in gallery mode doesn't work --- indra/newview/llinventorygallery.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'indra/newview/llinventorygallery.cpp') diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 845ea01f56..212f8b0446 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -2386,7 +2386,7 @@ BOOL LLInventoryGallery::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, return handled; } -void LLInventoryGallery::startDrag() +void LLInventoryGallery::startDrag() { std::vector types; uuid_vec_t ids; @@ -2407,22 +2407,25 @@ void LLInventoryGallery::startDrag() } const LLViewerInventoryCategory* cat = gInventory.getCategory(selected_id); - if (cat && gInventory.isObjectDescendentOf(selected_id, gInventory.getRootFolderID()) - && !LLFolderType::lookupIsProtectedType((cat)->getPreferredType())) + if (cat) { - if (cat->getOwnerID() == ALEXANDRIA_LINDEN_ID) + if (gInventory.isObjectDescendentOf(selected_id, gInventory.getLibraryRootFolderID())) { src = LLToolDragAndDrop::SOURCE_LIBRARY; + EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType()); + types.push_back(type); + ids.push_back(selected_id); + } + else if (gInventory.isObjectDescendentOf(selected_id, gInventory.getRootFolderID()) + && !LLFolderType::lookupIsProtectedType((cat)->getPreferredType())) + { + EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType()); + types.push_back(type); + ids.push_back(selected_id); } - - EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType()); - types.push_back(type); - ids.push_back(selected_id); } } - // We must have set this for some reason, but it's causing compile errors - (void)src; - LLToolDragAndDrop::getInstance()->beginMultiDrag(types, ids, LLToolDragAndDrop::SOURCE_AGENT); + LLToolDragAndDrop::getInstance()->beginMultiDrag(types, ids, src); } bool LLInventoryGallery::areViewsInitialized() -- cgit v1.2.3 From 9f3edb90d49bb10fa5608b4d6bdf242c243b0441 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 28 Nov 2023 23:27:18 +0200 Subject: SL-20181 Minor inventory fetching adjustements --- indra/newview/llinventorygallery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorygallery.cpp') diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 212f8b0446..9fb2783506 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -2386,7 +2386,7 @@ BOOL LLInventoryGallery::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, return handled; } -void LLInventoryGallery::startDrag() +void LLInventoryGallery::startDrag() { std::vector types; uuid_vec_t ids; -- cgit v1.2.3 From 7c8907522fe6600918dacc15ee138ca72b2cf35e Mon Sep 17 00:00:00 2001 From: AiraYumi Date: Sat, 6 Jan 2024 23:29:06 +0900 Subject: replace boost library to standard --- indra/newview/llinventorygallery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorygallery.cpp') diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 68581d04eb..651790dd68 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -3323,7 +3323,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, if (accept && drop) { - boost::shared_ptr move_inv (new LLMoveInv()); + std::shared_ptr move_inv (new LLMoveInv()); move_inv->mObjectID = inv_item->getParentUUID(); std::pair item_pair(folder_id, inv_item->getUUID()); move_inv->mMoveList.push_back(item_pair); -- cgit v1.2.3