summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2019-10-29 13:27:21 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2019-10-29 13:27:21 +0200
commit915587de4501a82487d3c355c247029f6a157341 (patch)
treee549bbc06e083d3837c0ff52039582269c656aee /indra
parenta97f13e16177425cceac9f0c4abf9935bbda9f8c (diff)
Fix crash on startup and restore missing settings
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml22
-rw-r--r--indra/newview/llpresetsmanager.cpp21
2 files changed, 33 insertions, 10 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 49601ae98f..a02cccb613 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16299,6 +16299,28 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>CameraOpacity</key>
+ <map>
+ <key>Comment</key>
+ <string>Opacity of the Camera Controls floater</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>1.0</real>
+ </map>
+ <key>PresetCameraActive</key>
+ <map>
+ <key>Comment</key>
+ <string>Name of currently selected preference</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>CefVerboseLog</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index c1702b4132..17fefbe6b1 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -262,8 +262,6 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n
}
else if(PRESETS_CAMERA == subdirectory)
{
- gSavedSettings.setString("PresetGraphicActive", name);
-
name_list.clear();
getControlNames(name_list);
name_list.push_back("PresetCameraActive");
@@ -292,14 +290,17 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n
{
std::string ctrl_name = *it;
LLControlVariable* ctrl = gSavedSettings.getControl(ctrl_name).get();
- std::string comment = ctrl->getComment();
- std::string type = LLControlGroup::typeEnumToString(ctrl->type());
- LLSD value = ctrl->getValue();
-
- paramsData[ctrl_name]["Comment"] = comment;
- paramsData[ctrl_name]["Persist"] = 1;
- paramsData[ctrl_name]["Type"] = type;
- paramsData[ctrl_name]["Value"] = value;
+ if (ctrl)
+ {
+ std::string comment = ctrl->getComment();
+ std::string type = LLControlGroup::typeEnumToString(ctrl->type());
+ LLSD value = ctrl->getValue();
+
+ paramsData[ctrl_name]["Comment"] = comment;
+ paramsData[ctrl_name]["Persist"] = 1;
+ paramsData[ctrl_name]["Type"] = type;
+ paramsData[ctrl_name]["Value"] = value;
+ }
}
}