summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp40
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();