diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-11 12:24:19 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-11 12:24:19 +0200 |
commit | e699dcb0c9ea378682d0d0cfbbb933f9e5c94332 (patch) | |
tree | 3d0a850ca7e56de8321080c29efb3b0480e782c6 /indra/newview/llgrouplist.cpp | |
parent | 791465bab968a738568ddf0abaa5fa6766eb020d (diff) |
fix for normall bug EXT-3245 Icon of group in list in "Group" tab is refreshed only after restarting Viewer
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llgrouplist.cpp')
-rw-r--r-- | indra/newview/llgrouplist.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 80b706a215..ab9db10f38 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -225,6 +225,11 @@ mGroupID(LLUUID::null) } } +LLGroupListItem::~LLGroupListItem() +{ + LLGroupMgr::getInstance()->removeObserver(this); +} + //virtual BOOL LLGroupListItem::postBuild() { @@ -277,8 +282,13 @@ void LLGroupListItem::setName(const std::string& name, const std::string& highli void LLGroupListItem::setGroupID(const LLUUID& group_id) { + LLGroupMgr::getInstance()->removeObserver(this); + + mID = group_id; mGroupID = group_id; setActive(group_id == gAgent.getGroupID()); + + LLGroupMgr::getInstance()->addObserver(this); } void LLGroupListItem::setGroupIconID(const LLUUID& group_icon_id) @@ -337,4 +347,11 @@ void LLGroupListItem::onProfileBtnClick() LLGroupActions::show(mGroupID); } +void LLGroupListItem::changed(LLGroupChange gc) +{ + LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mID); + if(group_data) + setGroupIconID(group_data->mInsigniaID); +} + //EOF |