diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloater.cpp | 3 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 18 |
2 files changed, 13 insertions, 8 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 43a37d6dff..8917d5490c 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -3107,4 +3107,5 @@ void LLFloater::stackWith(LLFloater& other) mRectControl.clear(); // don't save rect of stacked floaters setShape(next_rect); -}
\ No newline at end of file +} + 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; } //----------------------------------------------------------------------------- |