From 7e74e18548d9b508e3d4c3233044302742942eba Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Wed, 11 Nov 2009 20:27:29 -0500 Subject: Fix for EXT-2244 - Auto fill the My Outfits folder from library/clothing if empty -Reviewed by Seraph --- indra/newview/llinventorymodel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 4b7e364cf9..cc7a1ae14e 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -321,10 +321,10 @@ void LLInventoryModel::unlockDirectDescendentArrays(const LLUUID& cat_id) // specifies 'type' as what it defaults to containing. The category is // not necessarily only for that type. *NOTE: This will create a new // inventory category on the fly if one does not exist. -const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bool create_folder) +const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bool create_folder, bool find_in_library) { - const LLUUID &rv = findCatUUID(t); - if(rv.isNull() && isInventoryUsable() && create_folder) + const LLUUID &rv = findCatUUID(t, find_in_library); + if(rv.isNull() && isInventoryUsable() && (create_folder && !find_in_library)) { const LLUUID &root_id = gInventory.getRootFolderID(); if(root_id.notNull()) @@ -337,9 +337,9 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bo // Internal method which looks for a category with the specified // preferred type. Returns LLUUID::null if not found. -const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type) const +const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type, bool find_in_library) const { - const LLUUID &root_id = gInventory.getRootFolderID(); + const LLUUID &root_id = (find_in_library) ? gInventory.getLibraryRootFolderID() : gInventory.getRootFolderID(); if(LLFolderType::FT_CATEGORY == preferred_type) { return root_id; -- cgit v1.2.3 From 1bbcc4be8359b177aca093be0b451c12212f8a7d Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 12 Nov 2009 20:21:33 -0500 Subject: EXT-24131 : Diagnose warning spam: "WARNING: LLObjectBridge::performAction: object not found - ignoring" This warning is a false positive, also existed in 1.23. Removing. --HG-- branch : avatar-pipeline --- indra/newview/llinventorymodel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 4b0d524906..a61f45c2c9 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -886,7 +886,7 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id) // Delete a particular inventory object by ID. void LLInventoryModel::deleteObject(const LLUUID& id) { - purgeLinkedObjects(id); + //purgeLinkedObjects(id); lldebugs << "LLInventoryModel::deleteObject()" << llendl; LLPointer obj = getObject(id); if(obj) @@ -923,13 +923,14 @@ void LLInventoryModel::deleteObject(const LLUUID& id) } addChangedMask(LLInventoryObserver::REMOVE, id); obj = NULL; // delete obj + gInventory.notifyObservers(); } } // Delete a particular inventory item by ID, and remove it from the server. void LLInventoryModel::purgeObject(const LLUUID &id) { - lldebugs << "LLInventoryModel::purgeObject()" << llendl; + lldebugs << "LLInventoryModel::purgeObject() id:" << id << llendl; LLPointer obj = getObject(id); if(obj) { -- cgit v1.2.3 From 2ea1b06440369d059eb67eb47dc4945975dbdc65 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 12 Nov 2009 20:29:07 -0500 Subject: Backed out changeset: 153709ddee86 --HG-- branch : avatar-pipeline --- indra/newview/llinventorymodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index a61f45c2c9..4b0d524906 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -886,7 +886,7 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id) // Delete a particular inventory object by ID. void LLInventoryModel::deleteObject(const LLUUID& id) { - //purgeLinkedObjects(id); + purgeLinkedObjects(id); lldebugs << "LLInventoryModel::deleteObject()" << llendl; LLPointer obj = getObject(id); if(obj) @@ -923,14 +923,13 @@ void LLInventoryModel::deleteObject(const LLUUID& id) } addChangedMask(LLInventoryObserver::REMOVE, id); obj = NULL; // delete obj - gInventory.notifyObservers(); } } // Delete a particular inventory item by ID, and remove it from the server. void LLInventoryModel::purgeObject(const LLUUID &id) { - lldebugs << "LLInventoryModel::purgeObject() id:" << id << llendl; + lldebugs << "LLInventoryModel::purgeObject()" << llendl; LLPointer obj = getObject(id); if(obj) { -- cgit v1.2.3 From 999b9e28ce511b9a0753ebd87ce32cc524ef42ee Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 12 Nov 2009 20:36:54 -0500 Subject: EXT-2349 : Diagnose warning spam: "[X] is in model and in view, but STRUCTURE flag not set" EXT-2432 : Diagnose warning spam: "[X] does not exist in either view or model, but notification triggered" Restructured llinventorypanel's handling of add/remove/structure so it's easier to understand Removed false positive "notification triggered" warning since objects can now exist outside of various inventory panels' directories. --HG-- branch : avatar-pipeline --- indra/newview/llinventorymodel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 4b0d524906..ed5b7df5fa 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -886,7 +886,8 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id) // Delete a particular inventory object by ID. void LLInventoryModel::deleteObject(const LLUUID& id) { - purgeLinkedObjects(id); + // Disabling this; let users manually purge linked objects. + // purgeLinkedObjects(id); lldebugs << "LLInventoryModel::deleteObject()" << llendl; LLPointer obj = getObject(id); if(obj) @@ -923,13 +924,14 @@ void LLInventoryModel::deleteObject(const LLUUID& id) } addChangedMask(LLInventoryObserver::REMOVE, id); obj = NULL; // delete obj + gInventory.notifyObservers(); } } // Delete a particular inventory item by ID, and remove it from the server. void LLInventoryModel::purgeObject(const LLUUID &id) { - lldebugs << "LLInventoryModel::purgeObject()" << llendl; + lldebugs << "LLInventoryModel::purgeObject() [ id: " << id << " ] " << llendl; LLPointer obj = getObject(id); if(obj) { -- cgit v1.2.3 From 606256b9e68ba9538c39bd91e81bb1882c12b910 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 13 Nov 2009 11:08:28 -0500 Subject: Removed llinfos spam on prefetched items (changed to lldebugs). --HG-- branch : avatar-pipeline --- indra/newview/llinventorymodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index ed5b7df5fa..3354a43001 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -3345,7 +3345,7 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**) // If the item has already been added (e.g. from link prefetch), then it doesn't need to be re-added. if (gInventory.getItem(titem->getUUID())) { - llinfos << "Skipping prefetched item [ Name: " << titem->getName() << " | Type: " << titem->getActualType() << " | ItemUUID: " << titem->getUUID() << " ] " << llendl; + lldebugs << "Skipping prefetched item [ Name: " << titem->getName() << " | Type: " << titem->getActualType() << " | ItemUUID: " << titem->getUUID() << " ] " << llendl; continue; } gInventory.updateItem(titem); -- cgit v1.2.3 From f0cd44a6a2c4001111e82425cf2bd4fee63fad27 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 13 Nov 2009 16:18:53 -0500 Subject: EXT-2482 : Newly created folders have wrong default type Removed AT_ROOT_CATEGORY and FT_ROOT_CATEGORY since those types are unused. Changed FT_CATEGORY to FT_ROOT_INVENTORY to make its purpose more clear. This change assumes that no agent inventories have category type 9 for either inventory type or folder preferred type. --HG-- branch : avatar-pipeline --- indra/newview/llinventorymodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 3354a43001..3a1d457877 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -341,7 +341,7 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bo const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type) const { const LLUUID &root_id = gInventory.getRootFolderID(); - if(LLFolderType::FT_CATEGORY == preferred_type) + if(LLFolderType::FT_ROOT_INVENTORY == preferred_type) { return root_id; } @@ -2465,7 +2465,7 @@ void LLInventoryModel::buildParentChildMap() { cat->setParent(findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND)); } - else if(LLFolderType::FT_CATEGORY == pref) + else if(LLFolderType::FT_ROOT_INVENTORY == pref) { // it's the root cat->setParent(LLUUID::null); -- cgit v1.2.3 From 3027c9fcce0660a3f69a8ce6f6ccbb0de148a3e2 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 13 Nov 2009 16:58:08 -0500 Subject: Header file #include cleanup for llinventorymodel and llinventorypanel. Removed a bunch of unnecessary header inclues. --HG-- branch : avatar-pipeline --- indra/newview/llinventorymodel.cpp | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 3a1d457877..ffe5f7181d 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -31,40 +31,24 @@ */ #include "llviewerprecompiledheaders.h" - #include "llinventorymodel.h" -#include "llassetstorage.h" -#include "llcrc.h" -#include "lldir.h" -#include "llsys.h" -#include "llxfermanager.h" -#include "message.h" - #include "llagent.h" #include "llagentwearables.h" -#include "llfloater.h" -#include "llfocusmgr.h" -#include "llinventorybridge.h" -#include "llinventoryfunctions.h" #include "llinventorypanel.h" #include "llfloaterinventory.h" -#include "llviewerfoldertype.h" -#include "llviewerinventory.h" +#include "llinventorybridge.h" +#include "llinventoryfunctions.h" +#include "llwindow.h" +#include "llviewercontrol.h" +#include "llpreview.h" #include "llviewermessage.h" +#include "llviewerfoldertype.h" #include "llviewerwindow.h" -#include "llviewerregion.h" #include "llappviewer.h" -#include "lldbstrings.h" -#include "llviewerstats.h" -#include "llmutelist.h" -#include "llnotifications.h" +#include "llviewerregion.h" #include "llcallbacklist.h" -#include "llpreview.h" -#include "llviewercontrol.h" #include "llvoavatarself.h" -#include "llsdutil.h" -#include //#define DIFF_INVENTORY_FILES #ifdef DIFF_INVENTORY_FILES -- cgit v1.2.3 From acdce232994fce7edf9a67a360db2368c5ad6594 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 13 Nov 2009 17:47:00 -0500 Subject: Header file cleanup Removed unnecessary "#include llinventorymodel.h" now that llinventoryobserver was split from llinventorymodel. --HG-- branch : avatar-pipeline --- indra/newview/llinventorymodel.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index ffe5f7181d..a8e5c4c216 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -39,6 +39,7 @@ #include "llfloaterinventory.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" +#include "llinventoryobserver.h" #include "llwindow.h" #include "llviewercontrol.h" #include "llpreview.h" -- cgit v1.2.3