diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 6993ea20d5..0775a516e5 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -110,6 +110,35 @@ LLStatusBar *gStatusBar = NULL; S32 STATUS_BAR_HEIGHT = 26; extern S32 MENU_BAR_HEIGHT; +// FIRE-7639 - Stop the blinking after a while +LLViewerRegion* agent_region; +bool bakingStarted = false; + +class LORebakeStuck; +LORebakeStuck *bakeTimeout = NULL; + +class LORebakeStuck: public LLEventTimer +{ +public: + LORebakeStuck(LLStatusBar *bar) : LLEventTimer(30.0f) + { + mbar=bar; + } + ~LORebakeStuck() + { + bakeTimeout=NULL; + } + BOOL tick() + { + mbar->setRebakeStuck(true); + return TRUE; + } +private: + LLStatusBar *mbar; +}; + +// + // TODO: these values ought to be in the XML too const S32 MENU_PARCEL_SPACING = 1; // Distance from right of menu item to parcel information @@ -156,7 +185,8 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mSquareMetersCredit(0), mSquareMetersCommitted(0), mPathfindingFlashOn(TRUE), // Pathfinding rebake functions - mAudioStreamEnabled(FALSE) // ## Zi: Media/Stream separation + mAudioStreamEnabled(FALSE), // ## Zi: Media/Stream separation + mRebakeStuck(FALSE) // FIRE-7639 - Stop the blinking after a while { setRect(rect); @@ -425,9 +455,26 @@ void LLStatusBar::refresh() // Pathfinding rebake functions static LLPanelPathfindingRebakeNavmesh::ERebakeNavMeshMode pathfinding_mode=LLPanelPathfindingRebakeNavmesh::kRebakeNavMesh_Default; + // FIRE-7639 - Stop the blinking after a while + LLViewerRegion* current_region = gAgent.getRegion(); + if(current_region != agent_region) + { + agent_region=current_region; + bakingStarted = false; + mRebakeStuck = false; + } + // if( LLPanelPathfindingRebakeNavmesh::getInstance()->isRebaking()) { - LLViewerRegion* agent_region=gAgent.getRegion(); + // FIRE-7639 - Stop the blinking after a while + if(!bakingStarted) + { + bakingStarted = true; + mRebakeStuck = false; + bakeTimeout = new LORebakeStuck(this); + } + // + if( agent_region && agent_region->dynamicPathfindingEnabled() && mRebakingTimer.getElapsedTimeF32()>0.5f) @@ -1010,7 +1057,16 @@ void LLStatusBar::updateParcelIcons() F32 pathfinding_dirty_icon_alpha=1.0; if(LLPanelPathfindingRebakeNavmesh::getInstance()->isRebaking()) { - pathfinding_dirty_icon_alpha=mPathfindingFlashOn ? 1.0 : 0.25; + // FIRE-7639 - Stop the blinking after a while + if(mRebakeStuck) + { + pathfinding_dirty_icon_alpha = 0.5; + } + else + { + pathfinding_dirty_icon_alpha=mPathfindingFlashOn ? 1.0 : 0.25; + } + // pathfinding_navmesh_dirty=true; } // diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index cf403ae792..00bb9c62d4 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -252,6 +252,8 @@ public: static void onClickBalance(void* data); + void setRebakeStuck(bool stuck) { mRebakeStuck = stuck;} // FIRE-7639 - Stop the blinking after a while + private: /** @@ -332,6 +334,8 @@ private: LLFrameTimer mRebakingTimer; BOOL mPathfindingFlashOn; // + + bool mRebakeStuck; // FIRE-7639 - Stop the blinking after a while }; // *HACK: Status bar owns your cached money balance. JC