Skip to content

Commit 154d15d

Browse files
maxim-productenginemarchcat
authored andcommitted
#3403 fix Favorited worn outfit not coloured in My Outfits tab
1 parent 0c9f6f5 commit 154d15d

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

indra/newview/lloutfitslist.cpp

+9-16
Original file line numberDiff line numberDiff line change
@@ -1606,39 +1606,32 @@ bool LLOutfitAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
16061606
void LLOutfitAccordionCtrlTab::setFavorite(bool is_favorite)
16071607
{
16081608
mIsFavorite = is_favorite;
1609-
static LLUICachedControl<bool> highlight_color("InventoryFavoritesColorText", true);
1610-
if (!mIsSelected && mIsFavorite && highlight_color())
1611-
{
1612-
setTitleColor(LLUIColorTable::instance().getColor("InventoryFavoriteColor"));
1613-
}
1614-
else
1615-
{
1616-
setTitleColor(LLUIColorTable::instance().getColor("AccordionHeaderTextColor"));
1617-
}
1609+
updateTitleColor();
16181610
}
16191611

16201612
void LLOutfitAccordionCtrlTab::setOutfitSelected(bool val)
16211613
{
16221614
mIsSelected = val;
1623-
if (val)
1624-
{
1625-
setTitleFontStyle("BOLD");
1626-
setTitleColor(LLUIColorTable::instance().getColor("SelectedOutfitTextColor"));
1615+
setTitleFontStyle(mIsSelected ? "BOLD" : "NORMAL");
1616+
updateTitleColor();
16271617
}
1628-
else
1618+
1619+
void LLOutfitAccordionCtrlTab::updateTitleColor()
16291620
{
1630-
setTitleFontStyle("NORMAL");
16311621
static LLUICachedControl<bool> highlight_color("InventoryFavoritesColorText", true);
16321622
if (mIsFavorite && highlight_color())
16331623
{
16341624
setTitleColor(LLUIColorTable::instance().getColor("InventoryFavoriteColor"));
16351625
}
1626+
else if (mIsSelected)
1627+
{
1628+
setTitleColor(LLUIColorTable::instance().getColor("SelectedOutfitTextColor"));
1629+
}
16361630
else
16371631
{
16381632
setTitleColor(LLUIColorTable::instance().getColor("AccordionHeaderTextColor"));
16391633
}
16401634
}
1641-
}
16421635

16431636
void LLOutfitAccordionCtrlTab::drawFavoriteIcon()
16441637
{

indra/newview/lloutfitslist.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ class LLOutfitAccordionCtrlTab : public LLAccordionCtrlTab
276276
{}
277277
friend class LLUICtrlFactory;
278278

279+
void updateTitleColor();
279280
void drawFavoriteIcon();
280281

281282
LLUUID mFolderID;
@@ -431,7 +432,7 @@ class LLOutfitsList : public LLOutfitListBase
431432
// Used to monitor COF changes for updating items worn state. See EXT-8636.
432433
uuid_vec_t mCOFLinkedItems;
433434

434-
LLOutfitListSortMenu* mSortMenu;
435+
LLOutfitListSortMenu* mSortMenu;
435436

436437
//bool mIsInitialized;
437438
/**

0 commit comments

Comments
 (0)