summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofileview.cpp
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-08-04 15:34:34 -0700
committerbrad kittenbrink <brad@lindenlab.com>2009-08-04 15:34:34 -0700
commit33cc363a6813bf6c1268fa85747d1d403e00f8e5 (patch)
treed30696b245c4b5eb70575582d0dd9ddc4b20e5c7 /indra/newview/llpanelprofileview.cpp
parentdc62495da6e5c153c0df57fdbce6b0f40c0208f2 (diff)
parent89434ef6e64462041368ab26e049011fc84ae1e3 (diff)
Merged in latest viewer-2.0.0-3 up through svn r129410. LLFloaterTOS needs some post-merge cleanup.
Diffstat (limited to 'indra/newview/llpanelprofileview.cpp')
-rw-r--r--indra/newview/llpanelprofileview.cpp29
1 files changed, 21 insertions, 8 deletions
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index 7d02c8ff0b..00254ee8ee 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -35,6 +35,7 @@
#include "llpanelavatar.h"
#include "llpanelpicks.h"
+#include "llsidetraypanelcontainer.h"
#include "llpanelprofile.h"
static LLRegisterPanelClassWrapper<LLPanelProfileView> t_panel_target_profile("panel_profile_view");
@@ -56,15 +57,23 @@ LLPanelProfileView::~LLPanelProfileView(void)
/*virtual*/
void LLPanelProfileView::onOpen(const LLSD& key)
{
- LLPanelProfile::onOpen(key);
-
- //*NOTE profile view panel doesn't have own side tray tab and
- //is usually opened over People side tray tab. By Back button
- // Profile View panel just becomes invisible, see onBackBtnClick()
- setVisible(TRUE);
+ LLUUID id = key["id"];
+ if (key.has("open_tab_name"))
+ mTabContainer->selectTabByName(key["open_tab_name"]);
+
+ if(id.notNull() && mAvatarId != id)
+ {
+ mAvatarId = id;
+
+ mTabs[PANEL_PROFILE]->clear();
+ mTabs[PANEL_PICKS]->clear();
+ mTabs[PANEL_NOTES]->clear();
+ }
+
+ mTabContainer->getCurrentPanel()->onOpen(mAvatarId);
std::string full_name;
- gCacheName->getFullName(key["id"],full_name);
+ gCacheName->getFullName(mAvatarId,full_name);
childSetValue("user_name",full_name);
}
@@ -85,5 +94,9 @@ BOOL LLPanelProfileView::postBuild()
void LLPanelProfileView::onBackBtnClick()
{
- setVisible(FALSE);
+ LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
+ if(parent)
+ {
+ parent->openPreviousPanel();
+ }
}