From 6711e6584aa0aa5f17f76a557524725857fbf2ba Mon Sep 17 00:00:00 2001 From: prep Date: Tue, 19 Jun 2012 15:09:22 -0400 Subject: path-722: handling the case where region entry or teleporting would cause the rebake button to be drawn ontop of splash screen. --- indra/newview/llpathfindingmanager.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'indra/newview/llpathfindingmanager.cpp') diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index f49942ee97..d1a249edc5 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -302,7 +302,6 @@ void LLPathfindingManager::onRegionBoundaryCrossed() mNavMeshSlot = registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPathfindingManager::handleNavMeshStatus, this, _1, _2)); requestGetNavMeshForRegion(currentRegion, true); } - displayNavMeshRebakePanel(); } LLPathfindingManager::~LLPathfindingManager() @@ -771,14 +770,17 @@ void LLPathfindingManager::handleNavMeshStatus(LLPathfindingNavMesh::ENavMeshReq void LLPathfindingManager::displayNavMeshRebakePanel() { - LLView* rootp = LLUI::getRootView(); - LLPanel* panel_nmr_container = rootp->getChild("navmesh_rebake_container"); - LLPanelNavMeshRebake* panel_namesh_rebake = LLPanelNavMeshRebake::getInstance(); - panel_nmr_container->addChild( panel_namesh_rebake ); - panel_nmr_container->setVisible( TRUE ); - panel_namesh_rebake->reparent( rootp ); - LLPanelNavMeshRebake::getInstance()->setVisible( TRUE ); - LLPanelNavMeshRebake::getInstance()->resetButtonStates(); + if ( LLStartUp::getStartupState() == STATE_STARTED && gAgent.getTeleportState() == LLAgent::TELEPORT_NONE ) + { + LLView* rootp = LLUI::getRootView(); + LLPanel* panel_nmr_container = rootp->getChild("navmesh_rebake_container"); + LLPanelNavMeshRebake* panel_namesh_rebake = LLPanelNavMeshRebake::getInstance(); + panel_nmr_container->addChild( panel_namesh_rebake ); + panel_nmr_container->setVisible( TRUE ); + panel_namesh_rebake->reparent( rootp ); + LLPanelNavMeshRebake::getInstance()->setVisible( TRUE ); + LLPanelNavMeshRebake::getInstance()->resetButtonStates(); + } } void LLPathfindingManager::hideNavMeshRebakePanel() -- cgit v1.2.3