summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldebugview.cpp2
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp4
-rw-r--r--indra/newview/llscreenchannel.cpp8
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/llviewerwindow.h5
5 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 0596a8fe7d..53da9826ed 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -119,7 +119,7 @@ void LLDebugView::draw()
{
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
LLRect debug_rect;
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index e9cd912ca9..c920a3c898 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -286,7 +286,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
LLRect channel_rect;
mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView);
@@ -376,7 +376,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts()
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
if (!getParent())
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index f75e48c728..44c2a8fdaf 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -55,12 +55,12 @@ LLRect LLScreenChannelBase::getChannelRect()
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
if (mChicletRegion == NULL)
{
- mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+ mChicletRegion = gViewerWindow->getChicletContainer();
}
LLRect channel_rect;
@@ -103,12 +103,12 @@ bool LLScreenChannelBase::postBuild()
{
if (mFloaterSnapRegion == NULL)
{
- mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
}
if (mChicletRegion == NULL)
{
- mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+ mChicletRegion = gViewerWindow->getChicletContainer();
}
return true;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b13ccda5e0..be1b3bef1d 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2079,6 +2079,8 @@ void LLViewerWindow::initBase()
// Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI())
gToolBarView->setVisible(false);
+ mFloaterSnapRegion = gToolBarView->getChild<LLView>("floater_snap_region");
+ mChicletContainer = gToolBarView->getChild<LLPanel>("chiclet_container");
// Constrain floaters to inside the menu and status bar regions.
gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
for (S32 i = 0; i < LLToolBarEnums::TOOLBAR_COUNT; ++i)
@@ -2089,7 +2091,7 @@ void LLViewerWindow::initBase()
toolbarp->getCenterLayoutPanel()->setReshapeCallback(boost::bind(&LLFloaterView::setToolbarRect, gFloaterView, _1, _2));
}
}
- gFloaterView->setFloaterSnapView(main_view->getChild<LLView>("floater_snap_region")->getHandle());
+ gFloaterView->setFloaterSnapView(mFloaterSnapRegion->getHandle());
gSnapshotFloaterView = main_view->getChild<LLSnapshotFloaterView>("Snapshot Floater View");
const F32 CHAT_PERSIST_TIME = 20.f;
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index ba59ce4141..a449f4ad35 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -463,6 +463,9 @@ public:
static std::string getLastSnapshotDir();
+ LLView* getFloaterSnapRegion() { return mFloaterSnapRegion; }
+ LLPanel* getChicletContainer() { return mChicletContainer; }
+
private:
bool shouldShowToolTipFor(LLMouseHandler *mh);
@@ -491,6 +494,8 @@ private:
LLRect mWorldViewRectRaw; // area of screen for 3D world
LLRect mWorldViewRectScaled; // area of screen for 3D world scaled by UI size
LLRootView* mRootView; // a view of size mWindowRectRaw, containing all child views
+ LLView* mFloaterSnapRegion = nullptr;
+ LLPanel* mChicletContainer = nullptr;
LLVector2 mDisplayScale;
LLCoordGL mCurrentMousePoint; // last mouse position in GL coords