summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersaveprefpreset.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-09-26 21:25:11 +0100
committerGraham Linden <graham@lindenlab.com>2018-09-26 21:25:11 +0100
commit2783783575a9b712eb318b450dc5e6bb17d7f7c5 (patch)
treefdec4e4cf274e2a916e22d73d11afbce5bb669c0 /indra/newview/llfloatersaveprefpreset.cpp
parent6d256d679e9cea63753266420ed79efa8b70dee2 (diff)
parent58aef8beaf79dc83546a7b080014ca5030733ac8 (diff)
Merge to 5.2.0
Diffstat (limited to 'indra/newview/llfloatersaveprefpreset.cpp')
-rw-r--r--indra/newview/llfloatersaveprefpreset.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp
index eaacba893d..bae7602566 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)
@@ -77,7 +78,7 @@ void LLFloaterSavePrefPreset::onOpen(const LLSD& key)
setTitle(floater_title);
- EDefaultOptions option = DEFAULT_TOP;
+ EDefaultOptions option = DEFAULT_HIDE;
LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option);
onPresetNameEdited();
@@ -87,7 +88,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;
@@ -99,7 +104,7 @@ void LLFloaterSavePrefPreset::onBtnSave()
void LLFloaterSavePrefPreset::onPresetsListChange()
{
- EDefaultOptions option = DEFAULT_TOP;
+ EDefaultOptions option = DEFAULT_HIDE;
LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option);
}