From 19be4a4d4230e5d73f50209d399c9aab7daebb4e Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 12 Oct 2010 18:47:44 -0700 Subject: EXP-188 FIXED Object Inspector flashes on and off for an item that is for sale --- indra/newview/llviewerwindow.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b49d342126..1c0bec3047 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2948,18 +2948,20 @@ void LLViewerWindow::updateKeyboardFocus() LLUICtrl* parent = cur_focus->getParentUICtrl(); const LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot(); + bool new_focus_found = false; while(parent) { - if (parent->isCtrl() && - (parent->hasTabStop() || parent == focus_root) && - !parent->getIsChrome() && - parent->isInVisibleChain() && - parent->isInEnabledChain()) + if (parent->isCtrl() + && (parent->hasTabStop() || parent == focus_root) + && !parent->getIsChrome() + && parent->isInVisibleChain() + && parent->isInEnabledChain()) { if (!parent->focusFirstItem()) { parent->setFocus(TRUE); } + new_focus_found = true; break; } parent = parent->getParentUICtrl(); @@ -2968,7 +2970,7 @@ void LLViewerWindow::updateKeyboardFocus() // if we didn't find a better place to put focus, just release it // hasFocus() will return true if and only if we didn't touch focus since we // are only moving focus higher in the hierarchy - if (cur_focus->hasFocus()) + if (!new_focus_found) { cur_focus->setFocus(FALSE); } -- cgit v1.2.3