diff options
Diffstat (limited to 'indra/newview/llfloatersaveprefpreset.cpp')
-rw-r--r-- | indra/newview/llfloatersaveprefpreset.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp index bdef718d0e..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) @@ -76,7 +77,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(); @@ -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; @@ -98,7 +103,7 @@ void LLFloaterSavePrefPreset::onBtnSave() void LLFloaterSavePrefPreset::onPresetsListChange() { - EDefaultOptions option = DEFAULT_TOP; + EDefaultOptions option = DEFAULT_HIDE; LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option); } |