diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-08-22 19:32:50 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-08-22 19:32:50 +0300 |
commit | a1e6383b5f79a14d3394f5d849a1386ff72341c3 (patch) | |
tree | 233cff4c6913a707ee8285907bfdda68273c0fe1 /indra/newview/llfloatersaveprefpreset.cpp | |
parent | c24f638088f3d67ceebe82520787a4d344ebd72f (diff) |
MAINT-8926 Don't allow overwritting default preset
Diffstat (limited to 'indra/newview/llfloatersaveprefpreset.cpp')
-rw-r--r-- | indra/newview/llfloatersaveprefpreset.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp index 6320c6b626..684778c93a 100644 --- a/indra/newview/llfloatersaveprefpreset.cpp +++ b/indra/newview/llfloatersaveprefpreset.cpp @@ -34,6 +34,7 @@ #include "llfloaterreg.h" #include "llnotificationsutil.h" #include "llpresetsmanager.h" +#include "lltrans.h" LLFloaterSavePrefPreset::LLFloaterSavePrefPreset(const LLSD &key) : LLFloater(key) @@ -86,7 +87,11 @@ void LLFloaterSavePrefPreset::onBtnSave() { std::string name = mPresetCombo->getSimple(); - if (!LLPresetsManager::getInstance()->savePreset(mSubdirectory, name)) + if ((name == LLTrans::getString(PRESETS_DEFAULT)) || (name == PRESETS_DEFAULT)) + { + LLNotificationsUtil::add("DefaultPresetNotSaved"); + } + else if (!LLPresetsManager::getInstance()->savePreset(mSubdirectory, name)) { LLSD args; args["NAME"] = name; |