summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofileview.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
commitdb5cda26676f376f18816013c0c5e3fbad5b20d0 (patch)
treeb50e52262d34f55b4eaf35a3a1952007ef0a69de /indra/newview/llpanelprofileview.cpp
parent3c85899ee0db4a90d03ec687e514a31c1befe34e (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1211 https://svn.aws.productengine.com/secondlife/pe/stable-1@1228 -> viewer-2.0.0-3
QA: New movement and camera controls. Test all movement and camera behavior against spec and expected behaviors, including sitting & standing. Many other changes to the bottom bar. Changes to local chat behavior.
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();
+ }
}