@@ -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 ();
@@ -797,7 +790,7 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
797
790
{
798
791
// Assume a subfolder that contains or will contain outfits, track it
799
792
const LLUUID outfits = gInventory .findCategoryUUIDForType (LLFolderType::FT_MY_OUTFITS);
800
- mOutfitsObserver ->addCategory (cat_id, [this , outfits]()
793
+ mCategoriesObserver ->addCategory (cat_id, [this , outfits]()
801
794
{
802
795
observerCallback (outfits);
803
796
});
@@ -820,14 +813,8 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
820
813
if (!outfit_category)
821
814
return ;
822
815
823
- if (mOutfitsObserver == NULL )
824
- {
825
- mOutfitsObserver = new LLInventoryCategoriesObserver ();
826
- gInventory .addObserver (mOutfitsObserver );
827
- }
828
-
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