summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorygallery.cpp4
-rw-r--r--indra/newview/lloutfitslist.cpp3
-rw-r--r--indra/newview/llpanelwearing.cpp13
-rw-r--r--indra/newview/llpanelwearing.h1
4 files changed, 5 insertions, 16 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 9c7e96e97e..f97cb9dbf4 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -45,6 +45,7 @@
#include "llfriendcard.h"
#include "llgesturemgr.h"
#include "llmarketplacefunctions.h"
+#include "lloutfitobserver.h"
#include "lltrans.h"
#include "llviewerassettype.h"
#include "llviewermessage.h"
@@ -244,8 +245,7 @@ void LLInventoryGallery::updateRootFolder()
}
}
- const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
- mCategoriesObserver->addCategory(cof, boost::bind(&LLInventoryGallery::onCOFChanged, this));
+ LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLInventoryGallery::onCOFChanged, this));
if (!mGalleryCreated)
{
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index fe15d21e36..5c7792b0df 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -122,9 +122,8 @@ void LLOutfitsList::onOpen(const LLSD& info)
{
if (!mIsInitialized)
{
- const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
// Start observing changes in Current Outfit category.
- mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this));
+ LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLOutfitsList::onCOFChanged, this));
}
LLOutfitListBase::onOpen(info);
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 3347c40687..062150dc56 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -40,6 +40,7 @@
#include "llinventorymodel.h"
#include "llinventoryobserver.h"
#include "llmenubutton.h"
+#include "lloutfitobserver.h"
#include "llscrolllistctrl.h"
#include "llviewermenu.h"
#include "llviewerregion.h"
@@ -218,8 +219,6 @@ LLPanelWearing::LLPanelWearing()
, mIsInitialized(false)
, mAttachmentsChangedConnection()
{
- mCategoriesObserver = new LLInventoryCategoriesObserver();
-
mGearMenu = new LLWearingGearMenu(this);
mContextMenu = new LLWearingContextMenu();
mAttachmentsMenu = new LLTempAttachmentsContextMenu(this);
@@ -231,12 +230,6 @@ LLPanelWearing::~LLPanelWearing()
delete mContextMenu;
delete mAttachmentsMenu;
- if (gInventory.containsObserver(mCategoriesObserver))
- {
- gInventory.removeObserver(mCategoriesObserver);
- }
- delete mCategoriesObserver;
-
if (mAttachmentsChangedConnection.connected())
{
mAttachmentsChangedConnection.disconnect();
@@ -281,10 +274,8 @@ void LLPanelWearing::onOpen(const LLSD& /*info*/)
if (!category)
return;
- gInventory.addObserver(mCategoriesObserver);
-
// Start observing changes in Current Outfit category.
- mCategoriesObserver->addCategory(cof, boost::bind(&LLWearableItemsList::updateList, mCOFItemsList, cof));
+ LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLWearableItemsList::updateList, mCOFItemsList, cof));
// Fetch Current Outfit contents and refresh the list to display
// initially fetched items. If not all items are fetched now
diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h
index 715404a457..18e543eec6 100644
--- a/indra/newview/llpanelwearing.h
+++ b/indra/newview/llpanelwearing.h
@@ -90,7 +90,6 @@ private:
void getAttachmentLimitsCoro(std::string url);
- LLInventoryCategoriesObserver* mCategoriesObserver;
LLWearableItemsList* mCOFItemsList;
LLScrollListCtrl* mTempItemsList;
LLWearingGearMenu* mGearMenu;