From 16015cfb9f1e7d9983057e35c5ab41c92271b9a5 Mon Sep 17 00:00:00 2001
From: maxim_productengine <mnikolenko@productengine.com>
Date: Thu, 14 Nov 2019 17:51:58 +0200
Subject: [PATCH] SL-12186 Buildfix and update for creation of default presets

---
 indra/newview/app_settings/settings.xml   | 2 +-
 indra/newview/llfloatersaveprefpreset.cpp | 2 +-
 indra/newview/llstartup.cpp               | 3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 04ab620b3a5..2fe58177723 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16349,7 +16349,7 @@
     <key>Type</key>
     <string>String</string>
     <key>Value</key>
-    <string />
+    <string>Rear View</string>
   </map>
     <key>CefVerboseLog</key>
     <map>
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp
index c8d6513f4d9..31429917042 100644
--- a/indra/newview/llfloatersaveprefpreset.cpp
+++ b/indra/newview/llfloatersaveprefpreset.cpp
@@ -112,7 +112,7 @@ void LLFloaterSavePrefPreset::onOpen(const LLSD& key)
 void LLFloaterSavePrefPreset::onBtnSave()
 {
 	bool is_saving_new = mSaveRadioGroup->getSelectedIndex() == 0;
-	std::string name = is_saving_new ? mNameEditor->getValue() : mPresetCombo->getSimple();
+	std::string name = is_saving_new ? mNameEditor->getText() : mPresetCombo->getSimple();
 
 	if ((name == LLTrans::getString(PRESETS_DEFAULT)) || (name == PRESETS_DEFAULT))
 	{
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 6e0a36be490..8a5dbf317ac 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -71,6 +71,7 @@
 #include "llnotifications.h"
 #include "llnotificationsutil.h"
 #include "llpersistentnotificationstorage.h"
+#include "llpresetsmanager.h"
 #include "llteleporthistory.h"
 #include "llregionhandle.h"
 #include "llsd.h"
@@ -1960,6 +1961,8 @@ bool idle_startup()
 		// JC - 7/20/2002
 		gViewerWindow->sendShapeToSim();
 
+		LLPresetsManager::getInstance()->createMissingDefault(PRESETS_CAMERA);
+
 		// The reason we show the alert is because we want to
 		// reduce confusion for when you log in and your provided
 		// location is not your expected location. So, if this is
-- 
GitLab