summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2010-01-08 19:28:23 -0500
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2010-01-08 19:28:23 -0500
commit6d27a9e28d0711c78066f3f4977cd92069090357 (patch)
treed24ef0e810a9a05f6e5a95c6245382540825dff3 /indra
parent9f401893c09f9b67aec59459c2097a0c877fe70c (diff)
EXT-4038: Typo fix & proper handling of autopopulation if library clothing already imported
-Reviewed by vir
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagentwearables.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 63e12bd468..10a2dd132a 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -2291,15 +2291,16 @@ class LLLibraryOutfitsCopyDone: public LLInventoryCallback
{
public:
LLLibraryOutfitsCopyDone(LLLibraryOutfitsFetch * fetcher):
- mFireCount(0), mLibraryOutftifsFetcher(fetcher)
+ mFireCount(0), mLibraryOutfitsFetcher(fetcher)
{
}
virtual ~LLLibraryOutfitsCopyDone()
{
- if (mLibraryOutftifsFetcher)
+ if (mLibraryOutfitsFetcher)
{
- mLibraryOutftifsFetcher->importedFolderFetch();
+ gInventory.addObserver(mLibraryOutfitsFetcher);
+ mLibraryOutfitsFetcher->done();
}
}
@@ -2309,17 +2310,16 @@ public:
}
private:
U32 mFireCount;
- LLLibraryOutfitsFetch * mLibraryOutftifsFetcher;
+ LLLibraryOutfitsFetch * mLibraryOutfitsFetcher;
};
void LLLibraryOutfitsFetch::libraryDone(void)
{
- gInventory.removeObserver(this);
// Copy the clothing folders from the library into the imported clothing folder if necessary.
- LLPointer<LLInventoryCallback> copy_waiter = new LLLibraryOutfitsCopyDone(this);
-
if (mImportedClothingID == LLUUID::null)
{
+ gInventory.removeObserver(this);
+ LLPointer<LLInventoryCallback> copy_waiter = new LLLibraryOutfitsCopyDone(this);
mImportedClothingID = gInventory.createNewCategory(mClothingID,
LLFolderType::FT_NONE,
mImportedClothingName);
@@ -2334,6 +2334,11 @@ void LLLibraryOutfitsFetch::libraryDone(void)
LLAppearanceManager::getInstance()->shallowCopyCategory(iter->first, folder_id, copy_waiter);
}
}
+ else
+ {
+ // Skip straight to fetching the contents of the imported folder
+ importedFolderFetch();
+ }
}
void LLLibraryOutfitsFetch::importedFolderFetch(void)
@@ -2344,8 +2349,6 @@ void LLLibraryOutfitsFetch::importedFolderFetch(void)
mCompleteFolders.clear();
- gInventory.addObserver(this);
-
fetchDescendents(folders);
if (isEverythingComplete())
{