Remove mOutfitsObserver, use mCategoriesObserver from our base.
parent
25e6834127
commit
b62e7f96c2
|
|
@ -69,7 +69,6 @@ const S32 GALLERY_ITEMS_PER_ROW_MIN = 2;
|
|||
|
||||
LLOutfitGallery::LLOutfitGallery(const LLOutfitGallery::Params& p)
|
||||
: LLOutfitListBase(),
|
||||
mOutfitsObserver(NULL),
|
||||
mScrollPanel(NULL),
|
||||
mGalleryPanel(NULL),
|
||||
mLastRowPanel(NULL),
|
||||
|
|
@ -730,12 +729,6 @@ LLOutfitGallery::~LLOutfitGallery()
|
|||
{
|
||||
delete mOutfitGalleryMenu;
|
||||
|
||||
if (gInventory.containsObserver(mOutfitsObserver))
|
||||
{
|
||||
gInventory.removeObserver(mOutfitsObserver);
|
||||
}
|
||||
delete mOutfitsObserver;
|
||||
|
||||
while (!mUnusedRowPanels.empty())
|
||||
{
|
||||
LLPanel* panelp = mUnusedRowPanels.back();
|
||||
|
|
@ -793,17 +786,11 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
|
|||
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
|
||||
if (!cat) return;
|
||||
|
||||
if (mOutfitsObserver == NULL)
|
||||
{
|
||||
mOutfitsObserver = new LLInventoryCategoriesObserver();
|
||||
gInventory.addObserver(mOutfitsObserver);
|
||||
}
|
||||
|
||||
if (!isOutfitFolder(cat))
|
||||
{
|
||||
// Assume a subfolder that contains or will contain outfits, track it
|
||||
const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
|
||||
mOutfitsObserver->addCategory(cat_id, [this, outfits]()
|
||||
mCategoriesObserver->addCategory(cat_id, [this, outfits]()
|
||||
{
|
||||
observerCallback(outfits);
|
||||
});
|
||||
|
|
@ -827,7 +814,7 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
|
|||
return;
|
||||
|
||||
// Start observing changes in "My Outfits" category.
|
||||
mOutfitsObserver->addCategory(cat_id,
|
||||
mCategoriesObserver->addCategory(cat_id,
|
||||
boost::bind(&LLOutfitGallery::refreshOutfit, this, cat_id), true);
|
||||
|
||||
outfit_category->fetch();
|
||||
|
|
@ -840,7 +827,7 @@ void LLOutfitGallery::updateRemovedCategory(LLUUID cat_id)
|
|||
if (outfits_iter != mOutfitMap.end())
|
||||
{
|
||||
// 0. Remove category from observer.
|
||||
mOutfitsObserver->removeCategory(cat_id);
|
||||
mCategoriesObserver->removeCategory(cat_id);
|
||||
|
||||
//const LLUUID& outfit_id = outfits_iter->first;
|
||||
LLOutfitGalleryItem* item = outfits_iter->second;
|
||||
|
|
|
|||
|
|
@ -184,9 +184,6 @@ private:
|
|||
typedef item_num_map_t::value_type item_numb_map_value_t;
|
||||
item_num_map_t mItemIndexMap;
|
||||
std::map<S32, LLOutfitGalleryItem*> mIndexToItemMap;
|
||||
|
||||
|
||||
LLInventoryCategoriesObserver* mOutfitsObserver;
|
||||
};
|
||||
class LLOutfitGalleryContextMenu : public LLOutfitContextMenu
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue