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/app_settings/settings.xml | 8 ++++---- indra/newview/llinventorybridge.cpp | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e0d253c7fc..bc64222b22 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -16041,7 +16041,7 @@ Comment Show star near favorited items in inventory Persist - 0 + 1 Type Boolean Value @@ -16052,7 +16052,7 @@ Comment Show star near folders that contain favorites Persist - 0 + 1 Type Boolean Value @@ -16063,7 +16063,7 @@ Comment render favorite items using InventoryFavoriteText as color Persist - 0 + 1 Type Boolean Value @@ -16074,7 +16074,7 @@ Comment Defines behavior when hitting return on an inventory item Persist - 0 + 1 Type Boolean Value 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