diff options
author | paulgproductengine <none@none> | 2012-02-09 23:34:12 +0200 |
---|---|---|
committer | paulgproductengine <none@none> | 2012-02-09 23:34:12 +0200 |
commit | ca80e17e90ce5b70feca76ddf41d3c25d01ac830 (patch) | |
tree | 353a3f4d70291cd1ee458c172fe85f1b7ce71de5 /indra | |
parent | ed137f40d137dd78d0ec916ca91814cf5534a9f6 (diff) |
EXP-1822 FIXED (After deleting an item from inventory and confirming "ok" to delete, focus leaves inventory)
- Return focus to the previously focused root view
Diffstat (limited to 'indra')
-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); } } |