diff options
author | callum <none@none> | 2012-02-10 14:03:03 -0800 |
---|---|---|
committer | callum <none@none> | 2012-02-10 14:03:03 -0800 |
commit | 3e2eca7c1f215ff42844d6cf40bff4498ced457e (patch) | |
tree | 047b205483eedb68e7aa3423ca17286735a13aab /indra/newview/lltoastalertpanel.cpp | |
parent | 6c3d44449032e386c2b4163c3635f1fe6934e5d7 (diff) | |
parent | b72f1b59e8b673d9834bf18a466ec38e40650511 (diff) |
Merge with head
Diffstat (limited to 'indra/newview/lltoastalertpanel.cpp')
-rw-r--r-- | indra/newview/lltoastalertpanel.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index ada7570776..9ba8431fde 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -73,9 +73,14 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal // save currently focused view, so that return focus to it // on destroying this toast. LLView* current_selection = dynamic_cast<LLView*>(gFocusMgr.getKeyboardFocus()); - if (current_selection) + while(current_selection) { - mPreviouslyFocusedView = current_selection->getHandle(); + if (current_selection->isFocusRoot()) + { + mPreviouslyFocusedView = current_selection->getHandle(); + break; + } + current_selection = current_selection->getParent(); } const LLFontGL* font = LLFontGL::getFontSansSerif(); @@ -422,7 +427,7 @@ LLToastAlertPanel::~LLToastAlertPanel() // return focus to the previously focused view if (mPreviouslyFocusedView.get()) { - gFocusMgr.setKeyboardFocus(mPreviouslyFocusedView.get()); + mPreviouslyFocusedView.get()->setFocus(TRUE); } } |