summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlist.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2015-09-02 22:39:12 +0300
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2015-09-02 22:39:12 +0300
commit4d23c98faba3dbbb030ceac3f8278fa6869fdde3 (patch)
tree244fb95b9bc72a0164b3bad4ed3c4161a7374882 /indra/newview/llavatarlist.cpp
parent98f55052b12947f44b17227ff333ba95b2f11128 (diff)
parent70136a7e3d1ce1600ecc1b607923b6dd408b8d0e (diff)
MAINT-5297 FIXED Allow global toggle of 'View People Icons'
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();