summaryrefslogtreecommitdiff
path: root/indra/newview/llpresetsmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpresetsmanager.cpp')
-rw-r--r--indra/newview/llpresetsmanager.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 8b0a05984d..52964a125f 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -114,14 +114,10 @@ std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory)
{
std::string presets_path = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR);
- if (!gDirUtilp->fileExists(presets_path))
- {
- LLFile::mkdir(presets_path);
- }
+ LLFile::mkdir(presets_path);
std::string dest_path = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, subdirectory);
if (!gDirUtilp->fileExists(dest_path))
- {
LLFile::mkdir(dest_path);
if (PRESETS_CAMERA == subdirectory)
@@ -143,7 +139,6 @@ std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory)
}
}
}
- }
return dest_path;
}
@@ -219,7 +214,7 @@ void LLPresetsManager::settingChanged()
void LLPresetsManager::getControlNames(std::vector<std::string>& names)
{
- names = boost::assign::list_of
+ const std::vector<std::string> camera_controls = boost::assign::list_of
// From panel_preferences_move.xml
("CameraAngle")
("CameraOffsetScale")
@@ -230,7 +225,9 @@ void LLPresetsManager::getControlNames(std::vector<std::string>& names)
("CameraOffsetRearView")
("FocusOffsetRearView")
("CameraOffsetScale")
- ("TrackFocusObject");
+ ("TrackFocusObject")
+ ;
+ names = camera_controls;
}
bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string name, bool createDefault)
@@ -262,6 +259,7 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n
{
gSavedSettings.setString("PresetGraphicActive", name);
+ name_list.clear();
getControlNames(name_list);
name_list.push_back("PresetCameraActive");
}