@@ -69,7 +69,6 @@ const S32 GALLERY_ITEMS_PER_ROW_MIN = 2;
69
69
70
70
LLOutfitGallery::LLOutfitGallery (const LLOutfitGallery::Params& p)
71
71
: LLOutfitListBase(),
72
- mOutfitsObserver(NULL ),
73
72
mScrollPanel(NULL ),
74
73
mGalleryPanel(NULL ),
75
74
mLastRowPanel(NULL ),
@@ -730,12 +729,6 @@ LLOutfitGallery::~LLOutfitGallery()
730
729
{
731
730
delete mOutfitGalleryMenu ;
732
731
733
- if (gInventory .containsObserver (mOutfitsObserver ))
734
- {
735
- gInventory .removeObserver (mOutfitsObserver );
736
- }
737
- delete mOutfitsObserver ;
738
-
739
732
while (!mUnusedRowPanels .empty ())
740
733
{
741
734
LLPanel* panelp = mUnusedRowPanels .back ();
@@ -793,17 +786,11 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
793
786
LLViewerInventoryCategory *cat = gInventory .getCategory (cat_id);
794
787
if (!cat) return ;
795
788
796
- if (mOutfitsObserver == NULL )
797
- {
798
- mOutfitsObserver = new LLInventoryCategoriesObserver ();
799
- gInventory .addObserver (mOutfitsObserver );
800
- }
801
-
802
789
if (!isOutfitFolder (cat))
803
790
{
804
791
// Assume a subfolder that contains or will contain outfits, track it
805
792
const LLUUID outfits = gInventory .findCategoryUUIDForType (LLFolderType::FT_MY_OUTFITS);
806
- mOutfitsObserver ->addCategory (cat_id, [this , outfits]()
793
+ mCategoriesObserver ->addCategory (cat_id, [this , outfits]()
807
794
{
808
795
observerCallback (outfits);
809
796
});
@@ -827,7 +814,7 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
827
814
return ;
828
815
829
816
// Start observing changes in "My Outfits" category.
830
- mOutfitsObserver ->addCategory (cat_id,
817
+ mCategoriesObserver ->addCategory (cat_id,
831
818
boost::bind (&LLOutfitGallery::refreshOutfit, this , cat_id), true );
832
819
833
820
outfit_category->fetch ();
@@ -840,7 +827,7 @@ void LLOutfitGallery::updateRemovedCategory(LLUUID cat_id)
840
827
if (outfits_iter != mOutfitMap .end ())
841
828
{
842
829
// 0. Remove category from observer.
843
- mOutfitsObserver ->removeCategory (cat_id);
830
+ mCategoriesObserver ->removeCategory (cat_id);
844
831
845
832
// const LLUUID& outfit_id = outfits_iter->first;
846
833
LLOutfitGalleryItem* item = outfits_iter->second ;
0 commit comments