diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-08-18 17:52:00 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-08-18 17:52:00 -0400 |
commit | ce0b04889d3d02d1d1eabe84a566a641db1e2d8e (patch) | |
tree | f9501fe5624d4a0a40ce6e87fe2fb87ae2d4f476 /indra/llui/llview.cpp | |
parent | 4fb809eed5fbed458b5be883fba7196a5712aa48 (diff) | |
parent | b2ef0f99882db73680cc5dfb9570255414f7ba6d (diff) |
Merge.
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r-- | indra/llui/llview.cpp | 18 |
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; } //----------------------------------------------------------------------------- |