summaryrefslogtreecommitdiff
path: root/indra/newview/llgrouplist.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-15 19:20:03 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-15 19:20:03 -0500
commit073ec70829723e54f822052fe9c6c3e998e8dfca (patch)
tree3d7e782101a2284bcb0fcbf61273f8167d03544f /indra/newview/llgrouplist.cpp
parent4d4406820b858d59be670f0ca03bdadefba61c53 (diff)
parente7eae453908e77a959a2ef6fea272107491fe35e (diff)
automated merge viewer2.0->avp
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llgrouplist.cpp')
-rw-r--r--indra/newview/llgrouplist.cpp17
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