diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-07-24 12:44:02 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-07-25 08:45:52 -0400 |
commit | c8e988e1a16e9b6f7f8befaaf9752250dca25183 (patch) | |
tree | b14b4e719731e97f8fd9179a63202db94ed7f3a0 /indra | |
parent | 11448d490faeb0bb979f6296b97252548a9415a6 (diff) |
Fix excessive findChild calls when a docked control is open from LLDockControl::getAllowedRect
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/lldockcontrol.cpp | 7 | ||||
-rw-r--r-- | indra/llui/lldockcontrol.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index bf0862e8a9..11dbad8c09 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -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() diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index fb0bf7d251..7e31330713 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -84,6 +84,7 @@ private: bool mDockWidgetVisible; DocAt mDockAt; LLHandle<LLView> mDockWidgetHandle; + LLHandle<LLView> mNonToolbarPanelHandle; LLRect mPrevDockRect; LLRect mRootRect; LLRect mFloaterRect; |