summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofile.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-10-19 02:17:01 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-10-19 02:17:01 +0000
commitea1bfae838c59e24ec1a962f7d015d609b63d083 (patch)
tree4fb1bc94522313df13a6d329cd8fef29d099a46d /indra/newview/llpanelprofile.cpp
parent8103710c054ec6ea4a46f9732e569e543691184b (diff)
Merging revisions 2070-2084 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0, respecting ancestry
* Bugs: EXT-792 EXT-1519 EXT-1514 EXT-1245 EXT-1600 EXT-1535 EXT-1174 EXT-1241 * Dev: EXT-1271 EXT-1601 EXT-1154
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rw-r--r--indra/newview/llpanelprofile.cpp48
1 files changed, 37 insertions, 11 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index cda7942c1d..08d2baf6cd 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -117,25 +117,21 @@ void LLPanelProfile::onOpen(const LLSD& key)
void LLPanelProfile::togglePanel(LLPanel* panel)
{
// TRUE - we need to open/expand "panel"
- bool expand = getChildList()->back() != panel; // mTabCtrl->getVisible();
+ bool expand = getChildList()->front() != panel; // mTabCtrl->getVisible();
if (expand)
{
- //*NOTE on view profile panel along with tabcontainer there is
- // a backbutton that will be shown when there will be a panel over it even
- //if that panel has visible backgroud
- setAllChildrenVisible(FALSE);
-
- panel->setVisible(TRUE);
if (panel->getParent() != this)
{
- addChildInBack(panel);
+ addChild(panel);
}
else
{
- sendChildToBack(panel);
+ sendChildToFront(panel);
}
+ panel->setVisible(TRUE);
+
LLRect new_rect = getRect();
panel->reshape(new_rect.getWidth(), new_rect.getHeight());
new_rect.setLeftTopAndSize(0, new_rect.getHeight(), new_rect.getWidth(), new_rect.getHeight());
@@ -143,13 +139,12 @@ void LLPanelProfile::togglePanel(LLPanel* panel)
}
else
{
- this->setAllChildrenVisible(TRUE);
panel->setVisible(FALSE);
if (panel->getParent() == this)
{
removeChild(panel);
}
- sendChildToBack(getTabCtrl());
+
getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
}
}
@@ -174,3 +169,34 @@ void LLPanelProfile::setAllChildrenVisible(BOOL visible)
}
}
+void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
+{
+ if (panel->getParent() != this)
+ {
+ addChild(panel);
+ }
+ else
+ {
+ sendChildToFront(panel);
+ }
+
+ panel->setVisible(TRUE);
+
+ panel->onOpen(params);
+
+ LLRect new_rect = getRect();
+ panel->reshape(new_rect.getWidth(), new_rect.getHeight());
+ new_rect.setLeftTopAndSize(0, new_rect.getHeight(), new_rect.getWidth(), new_rect.getHeight());
+ panel->setRect(new_rect);
+}
+
+void LLPanelProfile::notifyParent(const LLSD& info)
+{
+ // lets update Picks list after Pick was saved
+ if("save_new_pick" == info["action"])
+ {
+ onOpen(info);
+ return;
+ }
+ LLPanel::notifyParent(info);
+}