Readded the fix for FIRE-495 which somehow got lost

Also fixed it a bit cause it didn't work
meow-7.2.2
Wolfspirit 2011-08-14 23:00:46 +02:00
parent 8eece388f5
commit a211aeca88
1 changed files with 22 additions and 9 deletions

View File

@ -6060,17 +6060,30 @@ class LLShowSidetrayPanel : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string panel_name = userdata.asString();
LLPanel* panel = LLSideTray::getInstance()->getPanel(panel_name);
if (panel)
std::string udock_name = userdata.asString();
if (panel_name == "sidepanel_inventory")
udock_name = "sidebar_inventory";
// AO: Proper behavior if tab is undocked
LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab",udock_name);
if (LLFloater::isShown(floater_tab) || LLFloater::isMinimized(floater_tab))
{
bool isMinimized = floater_tab->isMinimized();
floater_tab->setMinimized(!isMinimized);
}
else // Toggle docked sidetray
{
if (panel->isInVisibleChain())
LLPanel* panel = LLSideTray::getInstance()->getPanel(panel_name);
if (panel)
{
LLSideTray::getInstance()->hidePanel(panel_name);
}
else
{
LLSideTray::getInstance()->showPanel(panel_name);
if (panel->isInVisibleChain())
{
LLSideTray::getInstance()->hidePanel(panel_name);
}
else
{
LLSideTray::getInstance()->showPanel(panel_name);
}
}
}
return true;