diff options
author | Richard Linden <none@none> | 2011-08-11 10:11:59 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-08-11 10:11:59 -0700 |
commit | b215c724c1394e7c27a0309341ffc3b4f2154b25 (patch) | |
tree | c9a5eba93a0d333285bc2e87e15ed40e546f7d28 /indra/llui/llview.cpp | |
parent | c7b6a25728cd360348d1c3da5ace0971767206a4 (diff) | |
parent | 9a9e78740ada6a64847d1e915ae8e92258e8f10a (diff) |
Automated merge with http://hg.secondlife.com/viewer-development
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; } //----------------------------------------------------------------------------- |