void LLPanelProfile::onOpen(const LLSD& key) { getTabContainer()[PANEL_PICKS]->onOpen(getAvatarId()); // support commands to open further pieces of UI if (key.has("show_tab_panel")) { std::string panel = key["show_tab_panel"].asString(); if (panel == "create_classified") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { picks->createNewClassified(); } } else if (panel == "classified_details") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { LLSD params = key; params.erase("show_tab_panel"); params.erase("open_tab_name"); picks->openClassifiedInfo(params); } } else if (panel == "edit_classified") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { LLSD params = key; params.erase("show_tab_panel"); params.erase("open_tab_name"); picks->openClassifiedEdit(params); } } else if (panel == "create_pick") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { picks->createNewPick(); } } else if (panel == "edit_pick") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { LLSD params = key; params.erase("show_tab_panel"); params.erase("open_tab_name"); picks->openPickEdit(params); } } } }
void LLPanelProfile::onOpen(const LLSD& key) { // open the desired panel if (key.has("open_tab_name")) { getTabContainer()[PANEL_PICKS]->onClosePanel(); // onOpen from selected panel will be called from onTabSelected callback getTabCtrl()->selectTabByName(key["open_tab_name"]); } else { getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId()); } // support commands to open further pieces of UI if (key.has("show_tab_panel")) { std::string panel = key["show_tab_panel"].asString(); if (panel == "create_classified") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { picks->createNewClassified(); } } else if (panel == "classified_details") { LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]); if (picks) { LLSD params = key; params.erase("show_tab_panel"); params.erase("open_tab_name"); picks->openClassifiedInfo(params); } } } }