summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r--indra/llui/llview.cpp33
1 files changed, 14 insertions, 19 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 245126d178..659a54cc6e 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1299,15 +1299,7 @@ void LLView::drawChildren()
{
if (!mChildList.empty())
{
- static const LLRect* rootRect = NULL;
-
- if (!mParentView)
- {
- rootRect = &mRect;
- }
-
- LLRect screenRect;
-
+ LLView* rootp = LLUI::getRootView();
++sDepth;
for (child_list_reverse_iter_t child_iter = mChildList.rbegin(); child_iter != mChildList.rend();) // ++child_iter)
@@ -1317,9 +1309,8 @@ void LLView::drawChildren()
if (viewp->getVisible() && viewp->getRect().isValid())
{
- // Only draw views that are within the root view
- localRectToScreen(viewp->getRect(),&screenRect);
- if ( rootRect->overlaps(screenRect) && LLUI::sDirtyRect.overlaps(screenRect))
+ LLRect screen_rect = viewp->calcScreenRect();
+ if ( rootp->getLocalRect().overlaps(screen_rect) && LLUI::sDirtyRect.overlaps(screen_rect))
{
LLUI::pushMatrix();
{
@@ -1664,15 +1655,19 @@ BOOL LLView::hasAncestor(const LLView* parentp) const
BOOL LLView::childHasKeyboardFocus( const std::string& childname ) const
{
- LLView *child = findChildView(childname, TRUE);
- if (child)
- {
- return gFocusMgr.childHasKeyboardFocus(child);
- }
- else
+ LLView *focus = dynamic_cast<LLView *>(gFocusMgr.getKeyboardFocus());
+
+ while (focus != NULL)
{
- return FALSE;
+ if (focus->getName() == childname)
+ {
+ return TRUE;
+ }
+
+ focus = focus->getParent();
}
+
+ return FALSE;
}
//-----------------------------------------------------------------------------