From a220acb45496dfbfb154fa9e16943102eda922fc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 22 Apr 2024 23:45:44 +0300 Subject: viewer#1300 Inventory favorites basic framework --- indra/newview/llinventorybridge.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ddb69cdfb3..93567e6155 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2252,6 +2252,21 @@ const LLUUID& LLItemBridge::getThumbnailUUID() const return LLUUID::null; } +bool LLItemBridge::getIsFavorite() const +{ + LLViewerInventoryItem* item = NULL; + LLInventoryModel* model = getInventoryModel(); + if (model) + { + item = (LLViewerInventoryItem*)model->getItem(mUUID); + } + if (item) + { + return item->getIsFavorite(); + } + return false; +} + BOOL LLItemBridge::isItemPermissive() const { LLViewerInventoryItem* item = getItem(); @@ -2397,6 +2412,16 @@ const LLUUID& LLFolderBridge::getThumbnailUUID() const return LLUUID::null; } +bool LLFolderBridge::getIsFavorite() const +{ + LLViewerInventoryCategory* cat = getCategory(); + if (cat) + { + return cat->getIsFavorite(); + } + return false; +} + void LLFolderBridge::update() { // we know we have children but haven't fetched them (doesn't obey filter) -- cgit v1.2.3 From 384d694aba523218490ec48c22d97b63acbffd6f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 23 Apr 2024 23:28:58 +0300 Subject: viewer#1300 Inventory favorites context menu --- indra/newview/llinventorybridge.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 93567e6155..17f7f33891 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -852,7 +852,8 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Copy")); } - if (isAgentInventory() && !single_folder_root) + bool is_agent_inventory = isAgentInventory(); + if (is_agent_inventory && !single_folder_root) { items.push_back(std::string("New folder from selected")); items.push_back(std::string("Subfolder Separator")); @@ -865,6 +866,17 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } + if (getIsFavorite()) + { + items.push_back(std::string("Remove from Favorites")); + } + else if (is_agent_inventory + && gInventory.getRootFolderID() != mUUID + && !gInventory.isObjectDescendentOf(mUUID, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH))) + { + items.push_back(std::string("Add to Favorites")); + } + if (obj->getIsLinkType()) { items.push_back(std::string("Find Original")); -- cgit v1.2.3 From cea6eeeede9f687ca195cc9b9e778fd6784afbe2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 25 Apr 2024 04:46:42 +0300 Subject: viewer#1300 'Star' favorites in inventory image is WIP --- indra/newview/llinventorybridge.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 17f7f33891..560a2f265a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -866,7 +866,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } - if (getIsFavorite()) + if (isFavorite()) { items.push_back(std::string("Remove from Favorites")); } @@ -2264,7 +2264,7 @@ const LLUUID& LLItemBridge::getThumbnailUUID() const return LLUUID::null; } -bool LLItemBridge::getIsFavorite() const +bool LLItemBridge::isFavorite() const { LLViewerInventoryItem* item = NULL; LLInventoryModel* model = getInventoryModel(); @@ -2424,7 +2424,7 @@ const LLUUID& LLFolderBridge::getThumbnailUUID() const return LLUUID::null; } -bool LLFolderBridge::getIsFavorite() const +bool LLFolderBridge::isFavorite() const { LLViewerInventoryCategory* cat = getCategory(); if (cat) @@ -2434,6 +2434,16 @@ bool LLFolderBridge::getIsFavorite() const return false; } +bool LLFolderBridge::hasFavorites() const +{ + return mHasFavorites; +} + +void LLFolderBridge::setHasFavorites(bool val) +{ + mHasFavorites = val; +} + void LLFolderBridge::update() { // we know we have children but haven't fetched them (doesn't obey filter) @@ -8066,7 +8076,7 @@ void LLFolderViewGroupedItemBridge::groupFilterContextMenu(folder_view_item_dequ menuentry_vec_t disabled_items; if (get_selection_item_uuids(selected_items, ids)) { - if (!LLAppearanceMgr::instance().canAddWearables(ids) && canWearSelected(ids)) + if (!LLAppearanceMgr::instance().canAddWearables(ids, false) && canWearSelected(ids)) { disabled_items.push_back(std::string("Wearable And Object Wear")); disabled_items.push_back(std::string("Wearable Add")); -- cgit v1.2.3 From 2add3b49537fb041b880752dc5302ac6b317e601 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 29 Apr 2024 22:07:12 +0300 Subject: viewer#1300 'Star' favorites in inventory #3 --- indra/newview/llinventorybridge.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 560a2f265a..5620523f24 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2434,16 +2434,6 @@ bool LLFolderBridge::isFavorite() const return false; } -bool LLFolderBridge::hasFavorites() const -{ - return mHasFavorites; -} - -void LLFolderBridge::setHasFavorites(bool val) -{ - mHasFavorites = val; -} - void LLFolderBridge::update() { // we know we have children but haven't fetched them (doesn't obey filter) -- cgit v1.2.3 From 1e7dc04644367dd7eb1469b36848aac265eb7050 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 29 Apr 2024 22:07:12 +0300 Subject: viewer#1300 'Star' favorites in inventory #4 --- indra/newview/llinventorybridge.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 5620523f24..1f91ef2772 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1335,7 +1335,7 @@ BOOL LLInvFVBridge::isLinkedObjectMissing() const return FALSE; } -BOOL LLInvFVBridge::isAgentInventory() const +bool LLInvFVBridge::isAgentInventory() const { const LLInventoryModel* model = getInventoryModel(); if(!model) return FALSE; @@ -1343,6 +1343,13 @@ BOOL LLInvFVBridge::isAgentInventory() const return model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()); } +bool LLInvFVBridge::isAgentInventoryRoot() const +{ + const LLInventoryModel* model = getInventoryModel(); + if(!model) return false; + return gInventory.getRootFolderID() == mUUID; +} + BOOL LLInvFVBridge::isCOFFolder() const { return LLAppearanceMgr::instance().getIsInCOF(mUUID); @@ -7868,7 +7875,7 @@ protected: BOOL isItemInTrash() const; // return true if the item is in agent inventory. if false, it // must be lost or in the inventory library. - BOOL isAgentInventory() const; + bool isAgentInventory() const; void wearOnAvatar(); }; @@ -7879,7 +7886,7 @@ BOOL LLWearableBridgeAction::isItemInTrash() const return mModel->isObjectDescendentOf(mUUID, trash_id); } -BOOL LLWearableBridgeAction::isAgentInventory() const +bool LLWearableBridgeAction::isAgentInventory() const { if(!mModel) return FALSE; if(gInventory.getRootFolderID() == mUUID) return TRUE; -- cgit v1.2.3 From 645811c6ef3134a540fc1bc7d32d7bdb8fa35046 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 1 May 2024 03:16:47 +0300 Subject: Viewer#1301 Implement Inventory Favorites Tab WIP --- indra/newview/llinventorybridge.cpp | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1f91ef2772..d7c7c7b552 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -8063,6 +8063,48 @@ LLInvFVBridge* LLRecentInventoryBridgeBuilder::createBridge( return new_listener; } +/************************************************************************/ +/* Favorites Inventory Panel related classes */ +/************************************************************************/ +void LLFavoritesFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + // todo: consider things that should be disabled + menuentry_vec_t disabled_items, items; + buildContextMenuOptions(flags, items, disabled_items); + + hide_context_entries(menu, items, disabled_items); +} + +LLInvFVBridge* LLFavoritesInventoryBridgeBuilder::createBridge( + LLAssetType::EType asset_type, + LLAssetType::EType actual_asset_type, + LLInventoryType::EType inv_type, + LLInventoryPanel* inventory, + LLFolderViewModelInventory* view_model, + LLFolderView* root, + const LLUUID& uuid, + U32 flags /*= 0x00*/) const +{ + LLInvFVBridge* new_listener = NULL; + if (asset_type == LLAssetType::AT_CATEGORY + && actual_asset_type != LLAssetType::AT_LINK_FOLDER) + { + new_listener = new LLFavoritesFolderBridge(inv_type, inventory, root, uuid); + } + else + { + new_listener = LLInventoryFolderViewModelBuilder::createBridge(asset_type, + actual_asset_type, + inv_type, + inventory, + view_model, + root, + uuid, + flags); + } + return new_listener; +} + LLFolderViewGroupedItemBridge::LLFolderViewGroupedItemBridge() { } -- cgit v1.2.3 From db3e5afbfbbce73e8f8339e8b4f938f11023ca64 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 2 May 2024 23:10:51 +0300 Subject: Viewer#1301 Implement Inventory Favorites Tab --- indra/newview/llinventorybridge.cpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d7c7c7b552..20b2e1334e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -838,6 +838,8 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, { const LLInventoryObject *obj = getInventoryObject(); bool single_folder_root = (mRoot == NULL); + bool is_cof = isCOFFolder(); + bool is_inbox = isInboxFolder(); if (obj) { @@ -853,7 +855,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } bool is_agent_inventory = isAgentInventory(); - if (is_agent_inventory && !single_folder_root) + if (is_agent_inventory && !single_folder_root && !is_cof && !is_inbox) { items.push_back(std::string("New folder from selected")); items.push_back(std::string("Subfolder Separator")); @@ -889,6 +891,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (!isItemMovable() || !isItemRemovable()) { disabled_items.push_back(std::string("Cut")); + disabled_items.push_back(std::string("New folder from selected")); } } else @@ -898,7 +901,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, items.push_back(std::string("Find Links")); } - if (!isInboxFolder() && !single_folder_root) + if (!is_inbox && !single_folder_root) { items.push_back(std::string("Rename")); if (!isItemRenameable() || ((flags & FIRST_SELECTED_ITEM) == 0)) @@ -938,6 +941,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (!isItemMovable() || !isItemRemovable()) { disabled_items.push_back(std::string("Cut")); + disabled_items.push_back(std::string("New folder from selected")); } if (canListOnMarketplace() && !isMarketplaceListingsFolder() && !isInboxFolder()) @@ -960,7 +964,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } // Don't allow items to be pasted directly into the COF or the inbox - if (!isCOFFolder() && !isInboxFolder()) + if (!is_cof && !is_inbox) { items.push_back(std::string("Paste")); } @@ -4445,6 +4449,15 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("Rename")); items.push_back(std::string("thumbnail")); + if (cat->getIsFavorite()) + { + items.push_back(std::string("Remove from Favorites")); + } + else + { + items.push_back(std::string("Add to Favorites")); + } + addDeleteContextMenuOptions(items, disabled_items); // EXT-4030: disallow deletion of currently worn outfit const LLViewerInventoryItem *base_outfit_link = LLAppearanceMgr::instance().getBaseOutfitLink(); @@ -8029,6 +8042,7 @@ void LLRecentItemsFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) buildContextMenuOptions(flags, items, disabled_items); items.erase(std::remove(items.begin(), items.end(), std::string("New Folder")), items.end()); + items.erase(std::remove(items.begin(), items.end(), std::string("New folder from selected")), items.end()); hide_context_entries(menu, items, disabled_items); } @@ -8072,6 +8086,9 @@ void LLFavoritesFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) menuentry_vec_t disabled_items, items; buildContextMenuOptions(flags, items, disabled_items); + items.erase(std::remove(items.begin(), items.end(), std::string("New Folder")), items.end()); + items.erase(std::remove(items.begin(), items.end(), std::string("New folder from selected")), items.end()); + hide_context_entries(menu, items, disabled_items); } -- cgit v1.2.3 From 1c170381aea21cfd75d7b8789374f04f3a46d408 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 4 May 2024 01:50:50 +0300 Subject: viewer#1300 Update Inventory Settings --- indra/newview/llinventorybridge.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 20b2e1334e..20d415cda9 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7851,7 +7851,8 @@ void LLObjectBridgeAction::attachOrDetach() } else { - LLAppearanceMgr::instance().wearItemOnAvatar(mUUID, true, false); // Don't replace if adding. + static LLCachedControl inventory_linking(gSavedSettings, "InventoryAddAttachmentBehavior", false); + LLAppearanceMgr::instance().wearItemOnAvatar(mUUID, true, inventory_linking()); // Don't replace if adding. } } -- cgit v1.2.3 From 3066cce1996ae680501dd2166dcf9773a4e75585 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 17 May 2024 17:23:47 +0300 Subject: viewer#1300 Small menu adjustment --- indra/newview/llinventorybridge.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 20d415cda9..e930af2d27 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -872,11 +872,13 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, { items.push_back(std::string("Remove from Favorites")); } - else if (is_agent_inventory - && gInventory.getRootFolderID() != mUUID - && !gInventory.isObjectDescendentOf(mUUID, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH))) + else if (is_agent_inventory && !gInventory.isObjectDescendentOf(mUUID, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH))) { items.push_back(std::string("Add to Favorites")); + if (gInventory.getRootFolderID() == mUUID) + { + disabled_items.push_back(std::string("Add to Favorites")); + } } if (obj->getIsLinkType()) -- cgit v1.2.3 From 25b19eb6b8b8482d5f6cff0cae8665a0f7518eb1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 17 May 2024 22:22:45 +0300 Subject: viewer#1424 Proper links support for favorites --- indra/newview/llinventorybridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e930af2d27..aa6d747622 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2283,11 +2283,11 @@ bool LLItemBridge::isFavorite() const LLInventoryModel* model = getInventoryModel(); if (model) { - item = (LLViewerInventoryItem*)model->getItem(mUUID); + item = model->getItem(mUUID); } if (item) { - return item->getIsFavorite(); + return get_is_favorite(item); } return false; } -- cgit v1.2.3 From 6f7e50e2b21077dda6583f3add1521f3ba83bc19 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 22 May 2024 12:45:54 +0300 Subject: viewer#1425 Fix missed 'static' declarations --- indra/newview/llinventorybridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index aa6d747622..5e57a4512e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1208,8 +1208,8 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, LLInventoryModel::cat_array_t categories; LLInventoryModel::item_array_t items; gInventory.collectDescendents(local_version_folder_id, categories, items, FALSE); - LLCachedControl max_depth(gSavedSettings, "InventoryOutboxMaxFolderDepth", 4); - LLCachedControl max_count(gSavedSettings, "InventoryOutboxMaxFolderCount", 20); + static LLCachedControl max_depth(gSavedSettings, "InventoryOutboxMaxFolderDepth", 4); + static LLCachedControl max_count(gSavedSettings, "InventoryOutboxMaxFolderCount", 20); if (categories.size() >= max_count || depth > (max_depth + 1)) { -- cgit v1.2.3 From db3f7eafa05636a3079037109d3d21514b25a8bb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 4 Jun 2024 02:08:12 +0300 Subject: viewer#1588 Upload directly to Specified Inventory Folder --- indra/newview/llinventorybridge.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fbb4ac8801..b4a3054d07 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4263,6 +4263,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items } disabled_items.push_back(std::string("New Folder")); + disabled_items.push_back(std::string("upload_options")); disabled_items.push_back(std::string("upload_def")); disabled_items.push_back(std::string("create_new")); } @@ -4286,6 +4287,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items if (getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK) { disabled_items.push_back(std::string("New Folder")); + disabled_items.push_back(std::string("upload_options")); disabled_items.push_back(std::string("upload_def")); disabled_items.push_back(std::string("create_new")); } @@ -4351,6 +4353,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items } if (!isMarketplaceListingsFolder()) { + items.push_back(std::string("upload_options")); items.push_back(std::string("upload_def")); items.push_back(std::string("create_new")); items.push_back(std::string("New Script")); -- cgit v1.2.3 From fece367b9b6b351d112f9036ce445c52397c9b03 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 14 Jun 2024 18:27:20 +0300 Subject: jira-archive-internal#63268 Several objects are worn on the same part of the body by double-clicking on the object from the "Library" folder SL-13411 --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b4a3054d07..e4828b14cf 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6880,7 +6880,7 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action) else if(item && item->isFinished()) { // must be in library. copy it to our inventory and put it on. - LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0)); + LLPointer cb = new LLBoostFuncInventoryCallback(boost::bind(rez_attachment_cb, _1, (LLViewerJointAttachment*)0, true)); copy_inventory_item( gAgent.getID(), item->getPermissions().getOwner(), -- cgit v1.2.3 From dab8b9c62300e897c9b3f5826cdc6419c64ee1a5 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 29 Jan 2025 01:06:31 +0200 Subject: #3383 'InventoryAddAttachmentBehavior' setting should affect inventory panel in List view; update persistence of new settings --- indra/newview/llinventorybridge.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 7480956fab..8417bdb234 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6939,7 +6939,8 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action) item = (LLViewerInventoryItem*)gInventory.getItem(object_id); if(item && gInventory.isObjectDescendentOf(object_id, gInventory.getRootFolderID())) { - rez_attachment(item, NULL, true); // Replace if "Wear"ing. + static LLCachedControl replace_item(gSavedSettings, "InventoryAddAttachmentBehavior", false); + rez_attachment(item, NULL, ("attach" == action) ? replace_item() : true); // Replace if "Wear"ing. } else if(item && item->isFinished()) { -- cgit v1.2.3