diff options
author | AndreyL ProductEngine <andreylproductengine@lindenlab.com> | 2015-11-19 22:17:37 +0200 |
---|---|---|
committer | AndreyL ProductEngine <andreylproductengine@lindenlab.com> | 2015-11-19 22:17:37 +0200 |
commit | 0c4ec8642471bacb4bf9d61283aa28af8015985a (patch) | |
tree | c180d695398ce7fddf509033d43c892561ea4afa /indra/newview/llavatarlist.cpp | |
parent | 7adfbc7b8261b928f177042a24a4a0b9138a3776 (diff) |
MAINT-5297 Backed out changeset: dd9e3cbf10e5
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rwxr-xr-x | indra/newview/llavatarlist.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index c7fa375ada..8846d1317d 100755 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -63,18 +63,16 @@ bool LLAvatarList::contains(const LLUUID& id) return std::find(ids.begin(), ids.end(), id) != ids.end(); } -void LLAvatarList::setIconsVisible(bool visible) +void LLAvatarList::toggleIcons() { - if (visible == mShowIcons) // nothing to be done here. - return; - // Save the new value for new items to use. - mShowIcons = visible; - + mShowIcons = !mShowIcons; + gSavedSettings.setBOOL(mIconParamName, mShowIcons); + // 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); } @@ -189,8 +187,6 @@ void LLAvatarList::draw() updateAvatarNames(); } - setIconsVisible(gSavedSettings.getBOOL(mIconParamName) && !gSavedSettings.getBOOL("GlobalShowIconsOverride")); - if (mDirty) refresh(); |