Skip to content
Snippets Groups Projects
Commit ca80e17e authored by paulgproductengine's avatar paulgproductengine
Browse files

EXP-1822 FIXED (After deleting an item from inventory and confirming "ok" to...

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
parent ed137f40
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment