From c8e988e1a16e9b6f7f8befaaf9752250dca25183 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 24 Jul 2024 12:44:02 -0400 Subject: Fix excessive findChild calls when a docked control is open from LLDockControl::getAllowedRect --- indra/llui/lldockcontrol.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llui/lldockcontrol.cpp') 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("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("non_toolbar_panel")->getRect(); + if(!mNonToolbarPanelHandle.isDead()) + { + rect = mNonToolbarPanelHandle.get()->getRect(); + } } void LLDockControl::repositionDockable() -- cgit v1.2.3