summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2011-08-18 19:17:34 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2011-08-18 19:17:34 -0400
commitcb09994ae2a3d1d60a6554fea4c6a604b867c6eb (patch)
tree676b7c68e0b0422c63e4cb6dbd5ccc1e55168e2f /indra/llui/llview.cpp
parentcfe0a3cbe445900574b82e8c843bddc347f1b269 (diff)
parent299a01470402de0327fc7f839e5937fc6b60bf63 (diff)
merging in latest mesh-development
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r--indra/llui/llview.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 8803d106ba..659a54cc6e 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1655,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;
}
//-----------------------------------------------------------------------------