diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-11-28 14:08:23 +0200 |
---|---|---|
committer | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-11-28 15:11:52 +0200 |
commit | d2ade35b0914f86b1c0239dbf40f5d5972a11b07 (patch) | |
tree | 7b2b2f9b151f821a2fc002856b90e8d408c936c6 /indra/newview | |
parent | 15ea200cfbd972139cefb74b9185700a44a978d0 (diff) |
SL-20651 DragnDrop from library in gallery mode doesn't work
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventorygallery.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llinventoryobserver.cpp | 1 |
2 files changed, 14 insertions, 12 deletions
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<EDragAndDropType> 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() diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 281a8bc789..655bdfca6b 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -358,7 +358,6 @@ void LLInventoryFetchItemsObserver::startFetch() { // Start fetching whole folder since we need all items LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true); - } else { |