From fc956451b5a851cbc7682cda25f383c58e21eb8c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 4 Jul 2020 10:24:40 -0400
Subject: [PATCH] Use Quaternion type for quaternion setting controls

---
 indra/newview/app_settings/camera/Front.xml | 2 +-
 indra/newview/app_settings/camera/Rear.xml  | 2 +-
 indra/newview/app_settings/camera/Side.xml  | 2 +-
 indra/newview/app_settings/settings.xml     | 2 +-
 indra/newview/llfloatercamera.cpp           | 2 +-
 indra/newview/llfloatersavecamerapreset.cpp | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/indra/newview/app_settings/camera/Front.xml b/indra/newview/app_settings/camera/Front.xml
index 39f44e11a84..f9f615c4a7b 100644
--- a/indra/newview/app_settings/camera/Front.xml
+++ b/indra/newview/app_settings/camera/Front.xml
@@ -18,7 +18,7 @@
         <key>Persist</key>
         <integer>1</integer>
         <key>Type</key>
-        <string>LLSD</string>
+        <string>Quaternion</string>
         <key>Value</key>
         <array>
           <real>0</real>
diff --git a/indra/newview/app_settings/camera/Rear.xml b/indra/newview/app_settings/camera/Rear.xml
index 8dc36353ce2..a084f83bfe1 100644
--- a/indra/newview/app_settings/camera/Rear.xml
+++ b/indra/newview/app_settings/camera/Rear.xml
@@ -18,7 +18,7 @@
         <key>Persist</key>
         <integer>1</integer>
         <key>Type</key>
-        <string>LLSD</string>
+        <string>Quaternion</string>
         <key>Value</key>
         <array>
           <real>0</real>
diff --git a/indra/newview/app_settings/camera/Side.xml b/indra/newview/app_settings/camera/Side.xml
index 089ab93a8f6..5db5b164bdb 100644
--- a/indra/newview/app_settings/camera/Side.xml
+++ b/indra/newview/app_settings/camera/Side.xml
@@ -18,7 +18,7 @@
         <key>Persist</key>
         <integer>1</integer>
         <key>Type</key>
-        <string>LLSD</string>
+        <string>Quaternion</string>
         <key>Value</key>
         <array>
           <real>0</real>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 0d2c009bc2f..0d5ca75c5f5 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4738,7 +4738,7 @@
       <key>Persist</key>
       <integer>1</integer>
       <key>Type</key>
-      <string>LLSD</string>
+      <string>Quaternion</string>
       <key>Value</key>
       <array>
         <real>0</real>
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 941902c1faf..ddb7b35404a 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -579,7 +579,7 @@ void LLFloaterCamera::switchToPreset(const std::string& name)
 
 	if (isAgentAvatarValid() && gAgentAvatarp->getParent())
 	{
-		LLQuaternion sit_rot(gSavedSettings.getLLSD("AvatarSitRotation"));
+		LLQuaternion sit_rot(gSavedSettings.getQuaternion("AvatarSitRotation"));
 		if (sit_rot != LLQuaternion())
 		{
 			gAgent.rotate(~gAgent.getFrameAgent().getQuaternion());
diff --git a/indra/newview/llfloatersavecamerapreset.cpp b/indra/newview/llfloatersavecamerapreset.cpp
index 11809f9c824..5704a7a525c 100644
--- a/indra/newview/llfloatersavecamerapreset.cpp
+++ b/indra/newview/llfloatersavecamerapreset.cpp
@@ -106,7 +106,7 @@ void LLFloaterSaveCameraPreset::onBtnSave()
 	{
 		if (isAgentAvatarValid() && gAgentAvatarp->getParent())
 		{
-			gSavedSettings.setLLSD("AvatarSitRotation", gAgent.getFrameAgent().getQuaternion().getValue());
+			gSavedSettings.setQuaternion("AvatarSitRotation", gAgent.getFrameAgent().getQuaternion());
 		}
 		if (gAgentCamera.isJoystickCameraUsed())
 		{
-- 
GitLab