diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2023-10-13 14:02:51 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-10-13 14:02:51 -0700 |
commit | a91f08ba84844647bbcdecac11e85c449579527c (patch) | |
tree | 9bfdc77c9e7de33413b95f2648cb139b19cb06f0 /indra/newview/llpanelwearing.cpp | |
parent | cc0f831aaa960552b218da436da57b44cb2dfe0f (diff) | |
parent | cba71633559ccdfd394983a6086da816e739a730 (diff) |
Merge branch 'DRTVWR-559' into DRTVWR-592
Diffstat (limited to 'indra/newview/llpanelwearing.cpp')
-rw-r--r-- | indra/newview/llpanelwearing.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 3347c40687..5242c4fef9 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 @@ -566,7 +557,7 @@ void LLPanelWearing::onRemoveAttachment() { LLSelectMgr::getInstance()->deselectAll(); LLSelectMgr::getInstance()->selectObjectAndFamily(mAttachmentsMap[item->getUUID()]); - LLSelectMgr::getInstance()->sendDropAttachment(); + LLSelectMgr::getInstance()->sendDetach(); } } |