From ea1bfae838c59e24ec1a962f7d015d609b63d083 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Mon, 19 Oct 2009 02:17:01 +0000 Subject: 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 --- indra/newview/llpanelprofile.cpp | 48 +++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 11 deletions(-) (limited to 'indra/newview/llpanelprofile.cpp') 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); +} -- cgit v1.2.3