diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 5d86a6415..6c29e3fd2 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -105,6 +105,7 @@ set(llcommon_HEADER_FILES
CMakeLists.txt
aiframetimer.h
+ airecursive.h
aithreadid.h
aithreadsafe.h
bitpack.h
diff --git a/indra/llcommon/airecursive.h b/indra/llcommon/airecursive.h
new file mode 100644
index 000000000..0b22535a8
--- /dev/null
+++ b/indra/llcommon/airecursive.h
@@ -0,0 +1,58 @@
+/**
+ * @file airecursive.h
+ * @brief Declaration of AIRecursive.
+ *
+ * Copyright (c) 2013, Aleric Inglewood.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution.
+ *
+ * CHANGELOG
+ * and additional copyright holders.
+ *
+ * 05/01/2013
+ * Initial version, written by Aleric Inglewood @ SL
+ */
+
+#ifndef AI_RECURSIVE
+#define AI_RECURSIVE
+
+// Exception safe class to detect recursive calls.
+//
+// A unique, static bool must be passed (thread local if the function is
+// called by more than one thread).
+//
+// Example usage:
+//
+// void f()
+// {
+// static bool recursive;
+// if (recursive) return;
+// AIRecursive dummy(flag);
+// ...
+// }
+
+class AIRecursive {
+ private:
+ bool& mFlag;
+
+ public:
+ AIRecursive(bool& flag) : mFlag(flag) { mFlag = true; }
+ ~AIRecursive() { mFlag = false; }
+};
+
+#endif // AI_RECURSIVE
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 25370f739..1cbb52dab 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -57,6 +57,7 @@
#include "lltabcontainer.h"
#include "v2math.h"
#include "llfasttimer.h"
+#include "airecursive.h"
const S32 MINIMIZED_WIDTH = 160;
const S32 CLOSE_BOX_FROM_TOP = 1;
@@ -1988,9 +1989,16 @@ LLRect LLFloaterView::findNeighboringPosition( LLFloater* reference_floater, LLF
return new_rect;
}
-
void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus)
{
+ // Stop recursive call sequence
+ // LLFloaterView::bringToFront calls
+ // LLFloater::setFocus calls
+ // LLFloater::setFrontmost calls this again.
+ static bool recursive;
+ if (recursive) { return; }
+ AIRecursive enter(recursive);
+
// *TODO: make this respect floater's mAutoFocus value, instead of
// using parameter
if (child->getHost())
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 2850f52ee..a93b71a2e 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -14644,17 +14644,6 @@ This should be as low as possible, but too low may break functionality
Value
0
- UseFreezeTime
-
UseInventoryLinks