From 5c4ae5b11a44ab4711f0148cb721f35be9f18100 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 23 Feb 2017 17:50:36 -0500 Subject: STORM-2145 Camera Presets -- some initial work --- indra/newview/llpresetsmanager.cpp | 291 ++++++++++++++++++++++++++----------- 1 file changed, 205 insertions(+), 86 deletions(-) (limited to 'indra/newview/llpresetsmanager.cpp') diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 836f63bffa..16721a6efc 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -39,6 +39,7 @@ #include "llfloaterpreference.h" #include "llfloaterreg.h" #include "llfeaturemanager.h" +#include "llagentcamera.h" LLPresetsManager::LLPresetsManager() { @@ -46,6 +47,12 @@ LLPresetsManager::LLPresetsManager() LLPresetsManager::~LLPresetsManager() { + mCameraChangedSignal.disconnect(); +} + +void LLPresetsManager::triggerChangeCameraSignal() +{ + mPresetListChangeCameraSignal(); } void LLPresetsManager::triggerChangeSignal() @@ -53,15 +60,16 @@ void LLPresetsManager::triggerChangeSignal() mPresetListChangeSignal(); } -void LLPresetsManager::createMissingDefault() +void LLPresetsManager::createMissingDefault(const std::string& subdirectory) { - std::string default_file = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, PRESETS_GRAPHIC, PRESETS_DEFAULT + ".xml"); + std::string default_file = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, + subdirectory, PRESETS_DEFAULT + ".xml"); if (!gDirUtilp->fileExists(default_file)) { LL_INFOS() << "No default preset found -- creating one at " << default_file << LL_ENDL; - // Write current graphic settings as the default - savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT, true); + // Write current settings as the default + savePreset(subdirectory, PRESETS_DEFAULT, true); } else { @@ -69,6 +77,34 @@ void LLPresetsManager::createMissingDefault() } } +void LLPresetsManager::startWatching(const std::string& subdirectory) +{ + if (PRESETS_CAMERA == subdirectory) + { + std::vector name_list; + getControlNames(name_list); + + for (std::vector::iterator it = name_list.begin(); it != name_list.end(); ++it) + { + std::string ctrl_name = *it; +LL_WARNS() << "DBG starting watch on " << ctrl_name << LL_ENDL; + if (gSavedSettings.controlExists(ctrl_name)) + { + LLPointer cntrl_ptr = gSavedSettings.getControl(ctrl_name); + if (cntrl_ptr.isNull()) + { + LL_WARNS("Init") << "Unable to set signal on global setting '" << ctrl_name + << "'" << LL_ENDL; + } + else + { + mCameraChangedSignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&settingChanged)); + } + } + } + } +} + std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory) { std::string presets_path = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR); @@ -134,6 +170,49 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_nam presets = mPresetNames; } +bool LLPresetsManager::mCameraDirty = false; + +void LLPresetsManager::setCameraDirty(bool dirty) +{ + mCameraDirty = dirty; +} + +bool LLPresetsManager::isCameraDirty() +{ + return mCameraDirty; +} + +void LLPresetsManager::settingChanged() +{ +LL_WARNS() << "DBG setting changed" << LL_ENDL; + setCameraDirty(true); +} + +void LLPresetsManager::getControlNames(std::vector& names) +{ + names = boost::assign::list_of + ("CameraOffsetCustom0") + ("FocusOffsetCustom0") + // From panel_preferences_move.xml + ("CameraAngle") + ("CameraOffsetScale") + ("CameraOpacity") + ("EditCameraMovement") + ("AppearanceCameraMovement") + // From llagentcamera.cpp + ("RenderFarClip") + ("CameraOffsetBuild") + ("CameraPreset") + ("CameraOffsetRearView") + ("CameraOffsetFrontView") + ("CameraOffsetGroupView") + ("FocusOffsetRearView") + ("FocusOffsetFrontView") + ("FocusOffsetGroupView") + ("CameraOffsetScale") + ("TrackFocusObject"); +} + bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string name, bool createDefault) { if (LLTrans::getString(PRESETS_DEFAULT) == name) @@ -149,94 +228,110 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); if (instance && !createDefault) { - gSavedSettings.setString("PresetGraphicActive", name); + gSavedSettings.setString("PresetGraphicActive", name); instance->getControlNames(name_list); - LL_DEBUGS() << "saving preset '" << name << "'; " << name_list.size() << " names" << LL_ENDL; + LL_DEBUGS() << "saving preset '" << name << "'; " << name_list.size() << " names" << LL_ENDL; name_list.push_back("PresetGraphicActive"); } - else + else { - LL_WARNS() << "preferences floater instance not found" << LL_ENDL; - } + LL_WARNS() << "preferences floater instance not found" << LL_ENDL; + } } - else if(PRESETS_CAMERA == subdirectory) + else if(PRESETS_CAMERA == subdirectory) { - name_list = boost::assign::list_of - ("Placeholder"); + gSavedSettings.setString("PresetGraphicActive", name); +// gSavedSettings.setU32("CameraPreset", CAMERA_PRESET_CUSTOM0); + +// gSavedSettings.setVector3d("CameraOffsetCustom0", gAgentCamera.calcCameraPositionTargetGlobal()); +// gSavedSettings.setVector3d("FocusOffsetCustom0", gAgentCamera.calcFocusPositionTargetGlobal()); + + getControlNames(name_list); + name_list.push_back("PresetCameraActive"); } - else - { - LL_ERRS() << "Invalid presets directory '" << subdirectory << "'" << LL_ENDL; - } - - if (name_list.size() > 1 // if the active preset name is the only thing in the list, don't save the list - || (createDefault && name == PRESETS_DEFAULT && subdirectory == PRESETS_GRAPHIC)) // or create a default graphics preset from hw recommended settings - { - // make an empty llsd - LLSD paramsData(LLSD::emptyMap()); + else + { + LL_ERRS() << "Invalid presets directory '" << subdirectory << "'" << LL_ENDL; + } + + // make an empty llsd + LLSD paramsData(LLSD::emptyMap()); - if (createDefault) - { - paramsData = LLFeatureManager::getInstance()->getRecommendedSettingsMap(); - if (gSavedSettings.getU32("RenderAvatarMaxComplexity") == 0) - { - // use the recommended setting as an initial one (MAINT-6435) - gSavedSettings.setU32("RenderAvatarMaxComplexity", paramsData["RenderAvatarMaxComplexity"]["Value"].asInteger()); - } - } - else - { - for (std::vector::iterator it = name_list.begin(); it != name_list.end(); ++it) - { - 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(); - - paramsData[ctrl_name]["Comment"] = comment; - paramsData[ctrl_name]["Persist"] = 1; - paramsData[ctrl_name]["Type"] = type; - paramsData[ctrl_name]["Value"] = value; - } - } - - std::string pathName(getPresetsDir(subdirectory) + gDirUtilp->getDirDelimiter() + LLURI::escape(name) + ".xml"); - - // write to file - llofstream presetsXML(pathName.c_str()); - if (presetsXML.is_open()) - { - - LLPointer formatter = new LLSDXMLFormatter(); - formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); - presetsXML.close(); - saved = true; + // Create a default graphics preset from hw recommended settings + if (createDefault && name == PRESETS_DEFAULT && subdirectory == PRESETS_GRAPHIC) + { + paramsData = LLFeatureManager::getInstance()->getRecommendedSettingsMap(); + if (gSavedSettings.getU32("RenderAvatarMaxComplexity") == 0) + { + // use the recommended setting as an initial one (MAINT-6435) + gSavedSettings.setU32("RenderAvatarMaxComplexity", paramsData["RenderAvatarMaxComplexity"]["Value"].asInteger()); + } + } + else + { + for (std::vector::iterator it = name_list.begin(); it != name_list.end(); ++it) + { + 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(); + + paramsData[ctrl_name]["Comment"] = comment; + paramsData[ctrl_name]["Persist"] = 1; + paramsData[ctrl_name]["Type"] = type; + paramsData[ctrl_name]["Value"] = value; + } + } + + std::string pathName(getPresetsDir(subdirectory) + gDirUtilp->getDirDelimiter() + LLURI::escape(name) + ".xml"); + + // If the active preset name is the only thing in the list, don't save the list + if (paramsData.size() > 1) + { + // write to file + llofstream presetsXML(pathName.c_str()); + if (presetsXML.is_open()) + { + LLPointer formatter = new LLSDXMLFormatter(); + formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); + presetsXML.close(); + saved = true; - LL_DEBUGS() << "saved preset '" << name << "'; " << paramsData.size() << " parameters" << LL_ENDL; - - if (!createDefault) - { - gSavedSettings.setString("PresetGraphicActive", name); - // signal interested parties - triggerChangeSignal(); - } - } - else - { - LL_WARNS("Presets") << "Cannot open for output preset file " << pathName << LL_ENDL; - } - } + LL_DEBUGS() << "saved preset '" << name << "'; " << paramsData.size() << " parameters" << LL_ENDL; + + if (subdirectory == PRESETS_GRAPHIC) + { + gSavedSettings.setString("PresetGraphicActive", name); + // signal interested parties + triggerChangeSignal(); + } + + if (subdirectory == PRESETS_CAMERA) + { + gSavedSettings.setString("PresetCameraActive", name); + setCameraDirty(false); + // signal interested parties + triggerChangeCameraSignal(); + } + } + else + { + LL_WARNS("Presets") << "Cannot open for output preset file " << pathName << LL_ENDL; + } + } else - { - LL_INFOS() << "No settings found; preferences floater has not yet been created" << LL_ENDL; - } + { + LL_INFOS() << "No settings available to be saved" << LL_ENDL; + } return saved; } -void LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo, EDefaultOptions default_option) +bool LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo, EDefaultOptions default_option) { + bool sts = true; + combo->clearRows(); std::string presets_dir = getPresetsDir(subdirectory); @@ -259,8 +354,10 @@ void LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory, else { combo->setLabel(LLTrans::getString("preset_combo_label")); + sts = false; } } + return sts; } void LLPresetsManager::loadPreset(const std::string& subdirectory, std::string name) @@ -279,14 +376,19 @@ void LLPresetsManager::loadPreset(const std::string& subdirectory, std::string n if(PRESETS_GRAPHIC == subdirectory) { gSavedSettings.setString("PresetGraphicActive", name); - } - LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); - if (instance) + LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); + if (instance) + { + instance->refreshEnabledGraphics(); + } + triggerChangeSignal(); + } + if(PRESETS_CAMERA == subdirectory) { - instance->refreshEnabledGraphics(); + gSavedSettings.setString("PresetCameraActive", name); + triggerChangeCameraSignal(); } - triggerChangeSignal(); } else { @@ -317,17 +419,34 @@ bool LLPresetsManager::deletePreset(const std::string& subdirectory, std::string } // If you delete the preset that is currently marked as loaded then also indicate that no preset is loaded. - if (gSavedSettings.getString("PresetGraphicActive") == name) + if(PRESETS_GRAPHIC == subdirectory) { - gSavedSettings.setString("PresetGraphicActive", ""); + if (gSavedSettings.getString("PresetGraphicActive") == name) + { + gSavedSettings.setString("PresetGraphicActive", ""); + } + // signal interested parties + triggerChangeSignal(); } - // signal interested parties - triggerChangeSignal(); + if(PRESETS_CAMERA == subdirectory) + { + if (gSavedSettings.getString("PresetCameraActive") == name) + { + gSavedSettings.setString("PresetCameraActive", ""); + } + // signal interested parties + triggerChangeCameraSignal(); + } return sts; } +boost::signals2::connection LLPresetsManager::setPresetListChangeCameraCallback(const preset_list_signal_t::slot_type& cb) +{ + return mPresetListChangeCameraSignal.connect(cb); +} + boost::signals2::connection LLPresetsManager::setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb) { return mPresetListChangeSignal.connect(cb); -- cgit v1.2.3 From 527388694a8bb3f3c3bf1510e1e79562dd426385 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 13 Jan 2018 12:18:40 -0500 Subject: STORM-2145 Added a small floater --- indra/newview/llpresetsmanager.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llpresetsmanager.cpp') diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 80386b61f7..3daa6894f0 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -92,7 +92,6 @@ void LLPresetsManager::startWatching(const std::string& subdirectory) for (std::vector::iterator it = name_list.begin(); it != name_list.end(); ++it) { std::string ctrl_name = *it; -LL_WARNS() << "DBG starting watch on " << ctrl_name << LL_ENDL; if (gSavedSettings.controlExists(ctrl_name)) { LLPointer cntrl_ptr = gSavedSettings.getControl(ctrl_name); @@ -189,23 +188,18 @@ bool LLPresetsManager::isCameraDirty() void LLPresetsManager::settingChanged() { -LL_WARNS() << "DBG setting changed" << LL_ENDL; setCameraDirty(true); } void LLPresetsManager::getControlNames(std::vector& names) { names = boost::assign::list_of - ("CameraOffsetCustom0") - ("FocusOffsetCustom0") // From panel_preferences_move.xml ("CameraAngle") ("CameraOffsetScale") - ("CameraOpacity") ("EditCameraMovement") ("AppearanceCameraMovement") // From llagentcamera.cpp - ("RenderFarClip") ("CameraOffsetBuild") ("CameraPreset") ("CameraOffsetRearView") @@ -246,10 +240,6 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n else if(PRESETS_CAMERA == subdirectory) { gSavedSettings.setString("PresetGraphicActive", name); -// gSavedSettings.setU32("CameraPreset", CAMERA_PRESET_CUSTOM0); - -// gSavedSettings.setVector3d("CameraOffsetCustom0", gAgentCamera.calcCameraPositionTargetGlobal()); -// gSavedSettings.setVector3d("FocusOffsetCustom0", gAgentCamera.calcFocusPositionTargetGlobal()); getControlNames(name_list); name_list.push_back("PresetCameraActive"); -- cgit v1.2.3 From fc29786cb24dd54530169d82a19dbf54ca4fdb31 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sun, 14 Jan 2018 19:14:46 -0500 Subject: STORM-2145 Added copying of initial preset files --- indra/newview/llpresetsmanager.cpp | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'indra/newview/llpresetsmanager.cpp') diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 3daa6894f0..d4535c69c8 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -40,6 +40,7 @@ #include "llfloaterreg.h" #include "llfeaturemanager.h" #include "llagentcamera.h" +#include "llfile.h" LLPresetsManager::LLPresetsManager() { @@ -112,20 +113,38 @@ void LLPresetsManager::startWatching(const std::string& subdirectory) std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory) { std::string presets_path = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR); - std::string full_path; if (!gDirUtilp->fileExists(presets_path)) { LLFile::mkdir(presets_path); } - full_path = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, subdirectory); - if (!gDirUtilp->fileExists(full_path)) + std::string dest_path = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, subdirectory); + if (!gDirUtilp->fileExists(dest_path)) { - LLFile::mkdir(full_path); + LLFile::mkdir(dest_path); + + if (PRESETS_CAMERA == subdirectory) + { + std::string source_dir = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "Camera"); + LLDirIterator dir_iter(source_dir, "*.xml"); + bool found = true; + while (found) + { + std::string file; + found = dir_iter.next(file); + + if (found) + { + std::string source = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "Camera", file); + std::string dest = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, "Camera", file); + LLFile::copy(source, dest); + } + } + } } - return full_path; + return dest_path; } void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets, EDefaultOptions default_option) @@ -234,7 +253,7 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n } else { - LL_WARNS() << "preferences floater instance not found" << LL_ENDL; + LL_WARNS("Presets") << "preferences floater instance not found" << LL_ENDL; } } else if(PRESETS_CAMERA == subdirectory) @@ -387,7 +406,7 @@ void LLPresetsManager::loadPreset(const std::string& subdirectory, std::string n } else { - LL_WARNS() << "failed to load preset '"< Date: Mon, 15 Jan 2018 16:01:24 -0500 Subject: STORM-2145 Get current preset indicator to work properly --- indra/newview/llpresetsmanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llpresetsmanager.cpp') diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index d4535c69c8..7368615365 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -208,6 +208,12 @@ bool LLPresetsManager::isCameraDirty() void LLPresetsManager::settingChanged() { setCameraDirty(true); + + gSavedSettings.setString("PresetCameraActive", ""); + +// Hack call because this is a static routine + LLPresetsManager::getInstance()->triggerChangeCameraSignal(); + } void LLPresetsManager::getControlNames(std::vector& names) -- cgit v1.2.3 From 9c7b634ba60d7a0b3687472ce22f7bbfd3e28010 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 16 Jan 2018 11:27:49 -0500 Subject: STORM-2145 Change line ending type of preset files --- indra/newview/llpresetsmanager.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'indra/newview/llpresetsmanager.cpp') diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 7368615365..be6dd89aba 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -226,13 +226,8 @@ void LLPresetsManager::getControlNames(std::vector& names) ("AppearanceCameraMovement") // From llagentcamera.cpp ("CameraOffsetBuild") - ("CameraPreset") ("CameraOffsetRearView") - ("CameraOffsetFrontView") - ("CameraOffsetGroupView") ("FocusOffsetRearView") - ("FocusOffsetFrontView") - ("FocusOffsetGroupView") ("CameraOffsetScale") ("TrackFocusObject"); } -- cgit v1.2.3 From 23925816774eaf5baf0756f32435c32db408370f Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 16 Jan 2018 18:02:47 -0500 Subject: STORM-2145 Deal with preset files with spaces correctly --- indra/newview/llpresetsmanager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpresetsmanager.cpp') diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index be6dd89aba..ec4f5fd864 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -137,6 +137,7 @@ std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory) if (found) { std::string source = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "Camera", file); + file = LLURI::escape(file); std::string dest = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, "Camera", file); LLFile::copy(source, dest); } -- cgit v1.2.3 From 9954d8d82391a129ca2c4c9fe9a339bc80bc0817 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 18 Jan 2018 17:13:07 -0500 Subject: STORM-2145 Use string constant rather than a hardcoded string. --- indra/newview/llpresetsmanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpresetsmanager.cpp') diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index ec4f5fd864..8b0a05984d 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -126,7 +126,7 @@ std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory) if (PRESETS_CAMERA == subdirectory) { - std::string source_dir = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "Camera"); + std::string source_dir = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, PRESETS_CAMERA); LLDirIterator dir_iter(source_dir, "*.xml"); bool found = true; while (found) @@ -136,9 +136,9 @@ std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory) if (found) { - std::string source = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "Camera", file); + std::string source = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, PRESETS_CAMERA, file); file = LLURI::escape(file); - std::string dest = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, "Camera", file); + std::string dest = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PRESETS_DIR, PRESETS_CAMERA, file); LLFile::copy(source, dest); } } -- cgit v1.2.3 From b778abe02b80d68ea0894f237c001e8a5505cc13 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 30 Jan 2018 09:21:14 -0500 Subject: disambiguate boost list assignment by using a const for the value --- indra/newview/llpresetsmanager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpresetsmanager.cpp') diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index e0fa085658..52964a125f 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -214,7 +214,7 @@ void LLPresetsManager::settingChanged() void LLPresetsManager::getControlNames(std::vector& names) { - names = boost::assign::list_of + const std::vector camera_controls = boost::assign::list_of // From panel_preferences_move.xml ("CameraAngle") ("CameraOffsetScale") @@ -225,7 +225,9 @@ void LLPresetsManager::getControlNames(std::vector& names) ("CameraOffsetRearView") ("FocusOffsetRearView") ("CameraOffsetScale") - ("TrackFocusObject"); + ("TrackFocusObject") + ; + names = camera_controls; } bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string name, bool createDefault) -- cgit v1.2.3