summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallery.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-02-05 21:53:31 +0200
committerGitHub <noreply@github.com>2024-02-05 21:53:31 +0200
commitaa52c852d600aa6b2ea17cdd86f53972c95cca4a (patch)
tree757f3a3446e8f55e1cc073f1b3ab54d8e5af1b65 /indra/newview/llinventorygallery.cpp
parentedb2fb57f8782f966c7ea675d2e4c0135352ef02 (diff)
parent2a849259223a2d3fabafc118d711e73fa7fd604f (diff)
Merge pull request #734 from secondlife/DRTVWR-594-maint-Y
Diffstat (limited to 'indra/newview/llinventorygallery.cpp')
-rw-r--r--indra/newview/llinventorygallery.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 68581d04eb..d2056fb44d 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -2402,26 +2402,42 @@ void LLInventoryGallery::startDrag()
{
std::vector<EDragAndDropType> types;
uuid_vec_t ids;
+ LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_AGENT;
for (LLUUID& selected_id : mSelectedItemIDs)
{
const LLInventoryItem* item = gInventory.getItem(selected_id);
if (item)
{
+ if (item->getPermissions().getOwner() == ALEXANDRIA_LINDEN_ID)
+ {
+ src = LLToolDragAndDrop::SOURCE_LIBRARY;
+ }
+
EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(item->getType());
types.push_back(type);
ids.push_back(selected_id);
}
const LLViewerInventoryCategory* cat = gInventory.getCategory(selected_id);
- if (cat && gInventory.isObjectDescendentOf(selected_id, gInventory.getRootFolderID())
- && !LLFolderType::lookupIsProtectedType((cat)->getPreferredType()))
+ if (cat)
{
- EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType());
- types.push_back(type);
- ids.push_back(selected_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);
+ }
}
}
- LLToolDragAndDrop::getInstance()->beginMultiDrag(types, ids, LLToolDragAndDrop::SOURCE_AGENT);
+ LLToolDragAndDrop::getInstance()->beginMultiDrag(types, ids, src);
}
bool LLInventoryGallery::areViewsInitialized()