summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-07-10 21:18:42 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-07-10 21:18:42 +0000
commite4dc104e3296319476bb0d6c327d6a326c967976 (patch)
tree33125c00656d612a0e294eb4fe773aa60ff0d698 /indra/llui
parent923d84d08f98b33657d6bd861c34b985125db757 (diff)
EXT-70 Camera and Movement controls don't save their positions
DEV-35250 Quitting from the login screen forgets window placement and visibility (e.g. movement and camera floaters) reviewed by Leyla
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp11
-rw-r--r--indra/llui/llfloater.h1
-rw-r--r--indra/llui/llfloaterreg.cpp18
-rw-r--r--indra/llui/llfloaterreg.h1
4 files changed, 29 insertions, 2 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index e0a4c08753..f89bee6cfb 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -126,7 +126,8 @@ LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] =
};
LLMultiFloater* LLFloater::sHostp = NULL;
-BOOL LLFloater::sEditModeEnabled;
+BOOL LLFloater::sEditModeEnabled = FALSE;
+BOOL LLFloater::sQuitting = FALSE; // Temporary hack until onClose() behavior becomes data driven
LLFloater::handle_map_t LLFloater::sFloaterMap;
LLFloaterView* gFloaterView = NULL;
@@ -473,7 +474,8 @@ void LLFloater::storeRectControl()
void LLFloater::storeVisibilityControl()
{
- if( mVisibilityControl.size() > 1 )
+ // sQuitting is a temp hack until we standardize onClose() behavior so that it won't call this when quitting
+ if( !sQuitting && mVisibilityControl.size() > 1 )
{
LLUI::sSettingGroups["floater"]->setBOOL( mVisibilityControl, getVisible() );
}
@@ -566,6 +568,11 @@ void LLFloater::openFloater(const LLSD& key)
void LLFloater::closeFloater(bool app_quitting)
{
+ if (app_quitting)
+ {
+ LLFloater::sQuitting = true; // Temp hack until we standardize onClose()
+ }
+
// Always unminimize before trying to close.
// Most of the time the user will never see this state.
setMinimized(FALSE);
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index c639f90390..c23978b9da 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -372,6 +372,7 @@ private:
static LLMultiFloater* sHostp;
static BOOL sEditModeEnabled;
+ static BOOL sQuitting;
static std::string sButtonActiveImageNames[BUTTON_COUNT];
static std::string sButtonInactiveImageNames[BUTTON_COUNT];
static std::string sButtonPressedImageNames[BUTTON_COUNT];
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index faa763cea9..d12f600503 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -363,6 +363,24 @@ std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
return controlname;
}
+//static
+void LLFloaterReg::registerControlVariables()
+{
+ // Iterate through alll registered instance names and register rect and visibility control variables
+ for (build_map_t::iterator iter = sBuildMap.begin(); iter != sBuildMap.end(); ++iter)
+ {
+ const std::string& name = iter->first;
+ if (LLUI::sSettingGroups["floater"]->controlExists(getRectControlName(name)))
+ {
+ declareRectControl(name);
+ }
+ if (LLUI::sSettingGroups["floater"]->controlExists(getVisibilityControlName(name)))
+ {
+ declareVisibilityControl(name);
+ }
+ }
+}
+
// Callbacks
// static
diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h
index ef2f71ad18..7edac43c96 100644
--- a/indra/llui/llfloaterreg.h
+++ b/indra/llui/llfloaterreg.h
@@ -120,6 +120,7 @@ public:
static std::string declareRectControl(const std::string& name);
static std::string getVisibilityControlName(const std::string& name);
static std::string declareVisibilityControl(const std::string& name);
+ static void registerControlVariables();
// Callback wrappers
static void initUICtrlToFloaterVisibilityControl(LLUICtrl* ctrl, const LLSD& sdname);