From 3fb9993a4a74c19b872bb96ed4878cd7b7143208 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 16 Apr 2022 02:09:03 +0300 Subject: SL-15312 Legacy profiles remake #9 Cleanup obsolete properties processesing --- indra/newview/llpanelavatar.cpp | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) (limited to 'indra/newview/llpanelavatar.cpp') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index fada9cc98b..90f3e87ae9 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -76,23 +76,13 @@ LLPanelProfileTab::LLPanelProfileTab() LLPanelProfileTab::~LLPanelProfileTab() { - if(getAvatarId().notNull()) - { - LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this); - } } void LLPanelProfileTab::setAvatarId(const LLUUID& avatar_id) { if (avatar_id.notNull()) { - if (getAvatarId().notNull()) - { - LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId, this); - } mAvatarId = avatar_id; - LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this); - mSelfProfile = (getAvatarId() == gAgentID); } } @@ -130,3 +120,29 @@ void LLPanelProfileTab::setApplyProgress(bool started) } } } + +LLPanelProfilePropertiesPeocessorTab::LLPanelProfilePropertiesPeocessorTab() + : LLPanelProfileTab() +{ +} + +LLPanelProfilePropertiesPeocessorTab::~LLPanelProfilePropertiesPeocessorTab() +{ + if (getAvatarId().notNull()) + { + LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this); + } +} + +void LLPanelProfilePropertiesPeocessorTab::setAvatarId(const LLUUID & avatar_id) +{ + if (avatar_id.notNull()) + { + if (getAvatarId().notNull()) + { + LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this); + } + LLPanelProfileTab::setAvatarId(avatar_id); + LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this); + } +} -- cgit v1.3