summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-10-12 18:47:44 -0700
committerRichard Linden <none@none>2010-10-12 18:47:44 -0700
commit19be4a4d4230e5d73f50209d399c9aab7daebb4e (patch)
treeb108a7d73f69c3d2e5fa20a25614f715e01fd73e /indra/newview/llviewerwindow.cpp
parent6c7c124f4359b3147cd7441a2fca92a067026e11 (diff)
EXP-188 FIXED Object Inspector flashes on and off for an item that is for sale
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp14
1 files 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);
}