Fix excessive findChild calls when a docked control is open from LLDockControl::getAllowedRect
parent
11448d490f
commit
c8e988e1a1
|
|
@ -43,6 +43,8 @@ LLDockControl::LLDockControl(LLView* dockWidget, LLFloater* dockableFloater,
|
|||
mDockWidgetHandle = dockWidget->getHandle();
|
||||
}
|
||||
|
||||
mNonToolbarPanelHandle = mDockableFloater->getRootView()->getChild<LLView>("non_toolbar_panel")->getHandle();
|
||||
|
||||
if (dockableFloater->isDocked())
|
||||
{
|
||||
on();
|
||||
|
|
@ -97,7 +99,10 @@ void LLDockControl::setDock(LLView* dockWidget)
|
|||
|
||||
void LLDockControl::getAllowedRect(LLRect& rect)
|
||||
{
|
||||
rect = mDockableFloater->getRootView()->getChild<LLView>("non_toolbar_panel")->getRect();
|
||||
if(!mNonToolbarPanelHandle.isDead())
|
||||
{
|
||||
rect = mNonToolbarPanelHandle.get()->getRect();
|
||||
}
|
||||
}
|
||||
|
||||
void LLDockControl::repositionDockable()
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ private:
|
|||
bool mDockWidgetVisible;
|
||||
DocAt mDockAt;
|
||||
LLHandle<LLView> mDockWidgetHandle;
|
||||
LLHandle<LLView> mNonToolbarPanelHandle;
|
||||
LLRect mPrevDockRect;
|
||||
LLRect mRootRect;
|
||||
LLRect mFloaterRect;
|
||||
|
|
|
|||
Loading…
Reference in New Issue