diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 64592e8d50..bdfedef350 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -4672,7 +4672,9 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) LLAttachmentsMgr::instance().onAttachmentArrived(item_id); - mAttachmentsChangeSignal(); + // Better attachment list + //mAttachmentsChangeSignal(); + mAttachmentsChangeSignal(item_id); } void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) @@ -4694,7 +4696,9 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL; } - mAttachmentsChangeSignal(); + // Better attachment list + //mAttachmentsChangeSignal(); + mAttachmentsChangeSignal(item_id); } BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 95b323f8e2..6357ebbf38 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -249,8 +249,12 @@ public: void setAppearanceServiceURL(const std::string& url) { mAppearanceServiceURL = url; } std::string getAppearanceServiceURL() const; - typedef boost::function attachments_changed_callback_t; - typedef boost::signals2::signal attachments_changed_signal_t; + // Better attachment list + //typedef boost::function attachments_changed_callback_t; + //typedef boost::signals2::signal attachments_changed_signal_t; + typedef boost::function attachments_changed_callback_t; + typedef boost::signals2::signal attachments_changed_signal_t; + // boost::signals2::connection setAttachmentsChangedCallback(attachments_changed_callback_t cb); // [SL:KB] - Patch: Appearance-Misc diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 226d0cf16e..bcd302673c 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -141,8 +141,7 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name, // search_label += LLTrans::getString("worn"); // item_state = IS_WORN; //} - //if (mWornIndicationEnabled && get_is_item_worn(mInventoryItemUUID)) // This doesn't work properly yet, so just check for CoF to prevent false warnings - if (mWornIndicationEnabled && LLAppearanceMgr::instance().isLinkedInCOF(mInventoryItemUUID)) + if (mWornIndicationEnabled && get_is_item_worn(mInventoryItemUUID)) { std::string attachment_point_name; if (getType() != LLAssetType::AT_OBJECT || !isAgentAvatarValid()) // System layer or error condition, can't figure out attach point @@ -769,6 +768,7 @@ LLWearableItemsList::Params::Params() LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) : LLInventoryItemsList(p) +, mAttachmentsChangedCallbackConnection() // Better attachment list { setSortOrder(E_SORT_BY_TYPE_LAYER, false); mIsStandalone = p.standalone; @@ -784,11 +784,21 @@ LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) mShowComplexity = p.show_complexity; mBodyPartsComplexity = 0; // + + // Better attachment list + mAttachmentsChangedCallbackConnection = LLAppearanceMgr::instance().setAttachmentsChangedCallback(boost::bind(&LLWearableItemsList::updateChangedItem, this, _1)); } // virtual LLWearableItemsList::~LLWearableItemsList() -{} +{ + // Better attachment list + if (mAttachmentsChangedCallbackConnection.connected()) + { + mAttachmentsChangedCallbackConnection.disconnect(); + } + // +} // virtual LLPanel* LLWearableItemsList::createNewItem(LLViewerInventoryItem* item) @@ -881,6 +891,15 @@ void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uui } } +// Better attachment list +void LLWearableItemsList::updateChangedItem(const LLUUID& changed_item_uuid) +{ + uuid_vec_t items; + items.push_back(changed_item_uuid); + updateChangedItems(items); +} +// + void LLWearableItemsList::onRightClick(S32 x, S32 y) { uuid_vec_t selected_uuids; diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index cdd5cac605..c3a156b542 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -502,6 +502,9 @@ public: */ void updateChangedItems(const uuid_vec_t& changed_items_uuids); + // Better attachment list + void updateChangedItem(const LLUUID& changed_item_uuid); + bool isStandalone() const { return mIsStandalone; } ESortOrder getSortOrder() const { return mSortOrder; } @@ -532,6 +535,9 @@ protected: std::map mItemComplexityMap; U32 mBodyPartsComplexity; // + + // Better attachment list + boost::signals2::connection mAttachmentsChangedCallbackConnection; }; #endif //LL_LLWEARABLEITEMSLIST_H