diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2012-10-30 18:38:59 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2012-10-30 18:38:59 +0200 |
commit | 5215bf6edef283cb6c570d3e7aea11f0ecf8313f (patch) | |
tree | f55455e08e358ff06d31ef153b4c635e04996513 | |
parent | c0b1ae6d976a94918ea8adc0908eb7c1e3d11459 (diff) |
CHUI-415 FIXED Set focus to dependee floater before removing dependent floater from it
-rw-r--r-- | indra/llui/llfloater.cpp | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 58b17f74a8..8f7d4afb1b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -725,7 +725,27 @@ void LLFloater::closeFloater(bool app_quitting) make_ui_sound("UISndWindowClose"); } - //If floater is a dependent, remove it from parent (dependee) + gFocusMgr.clearLastFocusForGroup(this); + + if (hasFocus()) + { + // Do this early, so UI controls will commit before the + // window is taken down. + releaseFocus(); + + // give focus to dependee floater if it exists, and we had focus first + if (isDependent()) + { + LLFloater* dependee = mDependeeHandle.get(); + if (dependee && !dependee->isDead()) + { + dependee->setFocus(TRUE); + } + } + } + + + //If floater is a dependent, remove it from parent (dependee) LLFloater* dependee = mDependeeHandle.get(); if (dependee) { @@ -750,24 +770,6 @@ void LLFloater::closeFloater(bool app_quitting) } cleanupHandles(); - gFocusMgr.clearLastFocusForGroup(this); - - if (hasFocus()) - { - // Do this early, so UI controls will commit before the - // window is taken down. - releaseFocus(); - - // give focus to dependee floater if it exists, and we had focus first - if (isDependent()) - { - LLFloater* dependee = mDependeeHandle.get(); - if (dependee && !dependee->isDead()) - { - dependee->setFocus(TRUE); - } - } - } dirtyRect(); |