aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-01-11 16:10:10 -0600
committerJacek Antonelli2009-01-11 16:10:15 -0600
commit6156baad67c744ed03ea47798bfeb8a77698efc6 (patch)
tree872d35ff6df740462d8cb574d03f746dfd5dd1ae /linden/indra/llui/llfloater.cpp
parentSecond Life viewer sources 1.22.3-RC (diff)
downloadmeta-impy-6156baad67c744ed03ea47798bfeb8a77698efc6.zip
meta-impy-6156baad67c744ed03ea47798bfeb8a77698efc6.tar.gz
meta-impy-6156baad67c744ed03ea47798bfeb8a77698efc6.tar.bz2
meta-impy-6156baad67c744ed03ea47798bfeb8a77698efc6.tar.xz
Second Life viewer sources 1.22.4-RC
Diffstat (limited to 'linden/indra/llui/llfloater.cpp')
-rw-r--r--linden/indra/llui/llfloater.cpp31
1 files changed, 27 insertions, 4 deletions
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp
index 047342f..de4f6ce 100644
--- a/linden/indra/llui/llfloater.cpp
+++ b/linden/indra/llui/llfloater.cpp
@@ -544,6 +544,7 @@ void LLFloater::close(bool app_quitting)
544 if (getHost()) 544 if (getHost())
545 { 545 {
546 ((LLMultiFloater*)getHost())->removeFloater(this); 546 ((LLMultiFloater*)getHost())->removeFloater(this);
547 gFloaterView->addChild(this);
547 } 548 }
548 549
549 if (getSoundFlags() != SILENT 550 if (getSoundFlags() != SILENT
@@ -1318,8 +1319,8 @@ void LLFloater::onClickEdit(void *userdata)
1318 self->mEditing = self->mEditing ? FALSE : TRUE; 1319 self->mEditing = self->mEditing ? FALSE : TRUE;
1319} 1320}
1320 1321
1321// static 1322// static
1322void LLFloater::closeFocusedFloater() 1323LLFloater* LLFloater::getClosableFloaterFromFocus()
1323{ 1324{
1324 LLFloater* focused_floater = NULL; 1325 LLFloater* focused_floater = NULL;
1325 1326
@@ -1336,10 +1337,32 @@ void LLFloater::closeFocusedFloater()
1336 if (iter == sFloaterMap.end()) 1337 if (iter == sFloaterMap.end())
1337 { 1338 {
1338 // nothing found, return 1339 // nothing found, return
1339 return; 1340 return NULL;
1341 }
1342
1343 // The focused floater may not be closable,
1344 // Find and close a parental floater that is closeable, if any.
1345 for(LLFloater* floater_to_close = focused_floater;
1346 NULL != floater_to_close;
1347 floater_to_close = gFloaterView->getParentFloater(floater_to_close))
1348 {
1349 if(floater_to_close->isCloseable())
1350 {
1351 return floater_to_close;
1352 }
1340 } 1353 }
1341 1354
1342 focused_floater->close(); 1355 return NULL;
1356}
1357
1358// static
1359void LLFloater::closeFocusedFloater()
1360{
1361 LLFloater* floater_to_close = LLFloater::getClosableFloaterFromFocus();
1362 if(floater_to_close)
1363 {
1364 floater_to_close->close();
1365 }
1343 1366
1344 // if nothing took focus after closing focused floater 1367 // if nothing took focus after closing focused floater
1345 // give it to next floater (to allow closing multiple windows via keyboard in rapid succession) 1368 // give it to next floater (to allow closing multiple windows via keyboard in rapid succession)