diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-11-23 12:11:53 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-11-23 12:11:53 -0800 |
commit | 943789b53ac3f2750cb71dca6facc0de7fa39539 (patch) | |
tree | 124a3b6ae634b8128e9a007403d84ae21de230fd /indra/newview/llnearbychathandler.cpp | |
parent | 249abaa62ba61a69ad669507c92d3a373c8e34f3 (diff) |
SH-2710 FIX -- Removed calls to getChild happening every frame and during idle calls.
Reviewed by davep.
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r-- | indra/newview/llnearbychathandler.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index c43c95a366..7a17dbce3d 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -365,12 +365,15 @@ void LLNearbyChatScreenChannel::arrangeToasts() if(mStopProcessing || isHovering()) return; - LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region"); - + if (mFloaterSnapRegion == NULL) + { + mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region"); + } + if (!getParent()) { // connect to floater snap region just to get resize events, we don't care about being a proper widget - floater_snap_region->addChild(this); + mFloaterSnapRegion->addChild(this); setFollows(FOLLOWS_ALL); } @@ -378,7 +381,7 @@ void LLNearbyChatScreenChannel::arrangeToasts() updateRect(); LLRect channel_rect; - floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &channel_rect, gFloaterView); + mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView); channel_rect.mLeft += 10; channel_rect.mRight = channel_rect.mLeft + 300; |