SL-12558 FIXED The "Default" preset allows saving over it

meow-7.2.2
maxim_productengine 2020-01-15 14:02:02 +02:00
parent 941c1ee7f8
commit feb4280e29
2 changed files with 5 additions and 1 deletions

View File

@ -87,7 +87,10 @@ void LLFloaterSavePrefPreset::onBtnSave()
{
std::string name = mPresetCombo->getSimple();
if ((name == LLTrans::getString(PRESETS_DEFAULT)) || (name == PRESETS_DEFAULT))
std::string upper_name(name);
LLStringUtil::toUpper(upper_name);
if ((name == LLTrans::getString(PRESETS_DEFAULT)) || (upper_name == PRESETS_DEFAULT_UPPER))
{
LLNotificationsUtil::add("DefaultPresetNotSaved");
}

View File

@ -33,6 +33,7 @@
#include <map>
static const std::string PRESETS_DEFAULT = "Default";
static const std::string PRESETS_DEFAULT_UPPER = "DEFAULT";
static const std::string PRESETS_DIR = "presets";
static const std::string PRESETS_GRAPHIC = "graphic";
static const std::string PRESETS_CAMERA = "camera";