Skip to content
Snippets Groups Projects
Commit 879675d9 authored by Dmitry Zaporozhan's avatar Dmitry Zaporozhan
Browse files

Fixed critical bug EXT-4823 - [NUX] Default My Profile to Edit Mode

--HG--
branch : product-engine
parent 482eefcb
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,20 @@ BOOL LLPanelMe::postBuild()
void LLPanelMe::onOpen(const LLSD& key)
{
LLPanelProfile::onOpen(key);
if(key.isUndefined() || key.has("edit_my_profile"))
{
// Open Edit My Profile panel by default (through Side Tray -> My Profile) (EXT-4823)
buildEditPanel();
openPanel(mEditPanel, getAvatarId());
}
else if(mEditPanel)
{
// When opening Me Panel through Side Tray LLPanelMe::onOpen() is called twice.
// First time key can be undefined and second time - key may contain some data.
// Lets close Edit Panel if key does contain some data on second call.
closePanel(mEditPanel);
}
}
bool LLPanelMe::notifyChildren(const LLSD& info)
......
......@@ -197,11 +197,7 @@ void LLPanelProfile::togglePanel(LLPanel* panel, const LLSD& key)
}
else
{
panel->setVisible(FALSE);
if (panel->getParent() == this)
{
removeChild(panel);
}
closePanel(panel);
getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
}
......@@ -248,6 +244,16 @@ void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
panel->setRect(new_rect);
}
void LLPanelProfile::closePanel(LLPanel* panel)
{
panel->setVisible(FALSE);
if (panel->getParent() == this)
{
removeChild(panel);
}
}
S32 LLPanelProfile::notifyParent(const LLSD& info)
{
std::string action = info["action"];
......
......@@ -55,6 +55,8 @@ class LLPanelProfile : public LLPanel
virtual void openPanel(LLPanel* panel, const LLSD& params);
virtual void closePanel(LLPanel* panel);
S32 notifyParent(const LLSD& info);
protected:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment