Fix crash on startup and restore missing settings
parent
a97f13e161
commit
915587de45
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
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;
|
||||
paramsData[ctrl_name]["Comment"] = comment;
|
||||
paramsData[ctrl_name]["Persist"] = 1;
|
||||
paramsData[ctrl_name]["Type"] = type;
|
||||
paramsData[ctrl_name]["Value"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue