diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-12-10 15:44:01 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-12-10 15:44:01 +0200 |
commit | 5f86203f261b376ad74814e1e635dba077c7718b (patch) | |
tree | b465b5e4f169f04cb06bf146362d9bbae9ab3d9d | |
parent | 8d94e2af12aaf3cdb170a0b36e9ae36e91a2365d (diff) |
SL-12429 Use different setting name to prevent crash on old viewer
-rw-r--r-- | indra/newview/app_settings/settings.xml | 15 | ||||
-rw-r--r-- | indra/newview/llagentcamera.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llpresetsmanager.cpp | 6 |
4 files changed, 21 insertions, 10 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2fe5817772..86c3e6cf3f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1562,10 +1562,10 @@ <key>Value</key> <real>1.0</real> </map> - <key>CameraPreset</key> + <key>CameraPreset</key> <!-- deprecated (see SL-12429) --> <map> <key>Comment</key> - <string>Preset camera position - view (0 - rear, 1 - front, 2 - group, 3 - custom)</string> + <string>Preset camera position - view (0 - rear, 1 - front, 2 - group)</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -16351,6 +16351,17 @@ <key>Value</key> <string>Rear View</string> </map> + <key>CameraPresetType</key> + <map> + <key>Comment</key> + <string>Preset camera position - view (0 - rear, 1 - front, 2 - group, 3 - custom)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>U32</string> + <key>Value</key> + <integer>0</integer> + </map> <key>CefVerboseLog</key> <map> <key>Comment</key> diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 67b117657f..eb730d105d 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -208,7 +208,7 @@ void LLAgentCamera::init() mCameraFocusOffsetTarget = LLVector4(gSavedSettings.getVector3("CameraOffsetBuild")); - mCameraPreset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); + mCameraPreset = (ECameraPreset) gSavedSettings.getU32("CameraPresetType"); mCameraOffsetInitial = gSavedSettings.getControl("CameraOffsetRearView"); mFocusOffsetInitial = gSavedSettings.getControl("FocusOffsetRearView"); @@ -2386,7 +2386,7 @@ void LLAgentCamera::switchCameraPreset(ECameraPreset preset) resetPanDiff(); resetOrbitDiff(); - gSavedSettings.setU32("CameraPreset", mCameraPreset); + gSavedSettings.setU32("CameraPresetType", mCameraPreset); } diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index d3c1ba764b..7e538d1bfc 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -498,7 +498,7 @@ void LLFloaterCamera::updateState() void LLFloaterCamera::updateItemsSelection() { - ECameraPreset preset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); + ECameraPreset preset = (ECameraPreset) gSavedSettings.getU32("CameraPresetType"); LLSD argument; argument["selected"] = (preset == CAMERA_PRESET_REAR_VIEW) && !sFreeCamera; getChild<LLPanelCameraItem>("rear_view")->setValue(argument); @@ -588,11 +588,11 @@ void LLFloaterCamera::populatePresetCombo() std::string active_preset_name = gSavedSettings.getString("PresetCameraActive"); if (active_preset_name.empty()) { - gSavedSettings.setU32("CameraPreset", CAMERA_PRESET_CUSTOM); + gSavedSettings.setU32("CameraPresetType", CAMERA_PRESET_CUSTOM); updateItemsSelection(); mPresetCombo->setLabel(getString("inactive_combo_text")); } - else if ((ECameraPreset)gSavedSettings.getU32("CameraPreset") == CAMERA_PRESET_CUSTOM) + else if ((ECameraPreset)gSavedSettings.getU32("CameraPresetType") == CAMERA_PRESET_CUSTOM) { mPresetCombo->selectByValue(active_preset_name); } diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index dda705eeca..c4161ed1bc 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -309,7 +309,7 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n } else { - ECameraPreset new_camera_preset = (ECameraPreset)gSavedSettings.getU32("CameraPreset"); + ECameraPreset new_camera_preset = (ECameraPreset)gSavedSettings.getU32("CameraPresetType"); bool new_camera_offsets = false; if (IS_CAMERA) { @@ -332,7 +332,7 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n { new_camera_preset = CAMERA_PRESET_CUSTOM; } - new_camera_offsets = (!isDefaultCameraPreset(name) || (ECameraPreset)gSavedSettings.getU32("CameraPreset") != new_camera_preset); + new_camera_offsets = (!isDefaultCameraPreset(name) || (ECameraPreset)gSavedSettings.getU32("CameraPresetType") != new_camera_preset); } for (std::vector<std::string>::iterator it = name_list.begin(); it != name_list.end(); ++it) { @@ -353,7 +353,7 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n } if (IS_CAMERA) { - gSavedSettings.setU32("CameraPreset", new_camera_preset); + gSavedSettings.setU32("CameraPresetType", new_camera_preset); } } |