summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lloutfitslist.cpp24
-rw-r--r--indra/newview/lloutfitslist.h5
2 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index e4079c709a..8dd849f947 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -44,6 +44,7 @@
#include "llinventorymodel.h"
#include "lllistcontextmenu.h"
#include "llnotificationsutil.h"
+#include "lloutfitobserver.h"
#include "llsidetray.h"
#include "lltransutil.h"
#include "llviewermenu.h"
@@ -212,12 +213,16 @@ void LLOutfitsList::onOpen(const LLSD& /*info*/)
// Start observing changes in Current Outfit category.
mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this));
+ LLOutfitObserver::instance().addBOFChangedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this));
+ LLOutfitObserver::instance().addBOFReplacedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this));
+
// Fetch "My Outfits" contents and refresh the list to display
// initially fetched items. If not all items are fetched now
// the observer will refresh the list as soon as the new items
// arrive.
category->fetch();
refreshList(outfits);
+ highlightBaseOutfit();
mIsInitialized = true;
}
@@ -350,6 +355,25 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
mAccordion->sort();
}
+void LLOutfitsList::highlightBaseOutfit()
+{
+ // id of base outfit
+ LLUUID base_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID();
+ if (base_id != mHighlightedOutfitUUID)
+ {
+ if (mOutfitsMap[mHighlightedOutfitUUID])
+ {
+ mOutfitsMap[mHighlightedOutfitUUID]->setTitleFontStyle("NORMAL");
+ }
+
+ mHighlightedOutfitUUID = base_id;
+ }
+ if (mOutfitsMap[base_id])
+ {
+ mOutfitsMap[base_id]->setTitleFontStyle("BOLD");
+ }
+}
+
void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl)
{
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl);
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 33791fbe62..c984389f87 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -83,6 +83,9 @@ public:
void refreshList(const LLUUID& category_id);
+ // highlits currently worn outfit tab text and unhighlights previously worn
+ void highlightBaseOutfit();
+
void performAction(std::string action);
void setFilterSubString(const std::string& string);
@@ -167,6 +170,8 @@ private:
wearables_lists_map_t mSelectedListsMap;
LLUUID mSelectedOutfitUUID;
+ // id of currently highlited outfit
+ LLUUID mHighlightedOutfitUUID;
selection_change_signal_t mSelectionChangeSignal;
std::string mFilterSubString;