summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2020-01-15 14:02:02 +0200
committermaxim_productengine <mnikolenko@productengine.com>2020-01-15 14:02:02 +0200
commitfeb4280e290d3bad8556a7d5073aec0b838e41e6 (patch)
treeca749c56f7219c00b8e7296b9e0a722b33aa6b7d /indra
parent941c1ee7f8a0446937c37ba6ce31503a0c360d50 (diff)
SL-12558 FIXED The "Default" preset allows saving over it
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatersaveprefpreset.cpp5
-rw-r--r--indra/newview/llpresetsmanager.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp
index 684778c93a..8eb3510881 100644
--- a/indra/newview/llfloatersaveprefpreset.cpp
+++ b/indra/newview/llfloatersaveprefpreset.cpp
@@ -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");
}
diff --git a/indra/newview/llpresetsmanager.h b/indra/newview/llpresetsmanager.h
index 0014e32267..488a61290b 100644
--- a/indra/newview/llpresetsmanager.h
+++ b/indra/newview/llpresetsmanager.h
@@ -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";