summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rwxr-xr-xindra/newview/llavatarlist.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 8846d1317d..c7fa375ada 100755
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -63,16 +63,18 @@ bool LLAvatarList::contains(const LLUUID& id)
return std::find(ids.begin(), ids.end(), id) != ids.end();
}
-void LLAvatarList::toggleIcons()
+void LLAvatarList::setIconsVisible(bool visible)
{
+ if (visible == mShowIcons) // nothing to be done here.
+ return;
+
// Save the new value for new items to use.
- mShowIcons = !mShowIcons;
- gSavedSettings.setBOOL(mIconParamName, mShowIcons);
-
+ mShowIcons = visible;
+
// Show/hide icons for all existing items.
std::vector<LLPanel*> items;
getItems(items);
- for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++)
+ for (std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++)
{
static_cast<LLAvatarListItem*>(*it)->setAvatarIconVisible(mShowIcons);
}
@@ -187,6 +189,8 @@ void LLAvatarList::draw()
updateAvatarNames();
}
+ setIconsVisible(gSavedSettings.getBOOL(mIconParamName) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"));
+
if (mDirty)
refresh();