summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterdeleteprefpreset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterdeleteprefpreset.cpp')
-rw-r--r--indra/newview/llfloaterdeleteprefpreset.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp
index f147a5ee90..68b107a1aa 100644
--- a/indra/newview/llfloaterdeleteprefpreset.cpp
+++ b/indra/newview/llfloaterdeleteprefpreset.cpp
@@ -1,5 +1,5 @@
/**
- * @file llfloaterdeletprefpreset.cpp
+ * @file llfloaterdeleteprefpreset.cpp
* @brief Floater to delete a graphics / camera preset
*
* $LicenseInfo:firstyear=2014&license=viewerlgpl$
@@ -67,20 +67,14 @@ void LLFloaterDeletePrefPreset::onBtnDelete()
LLComboBox* combo = getChild<LLComboBox>("preset_combo");
std::string name = combo->getSimple();
- if (LLPresetsManager::getInstance()->deletePreset(mSubdirectory, name))
- {
- // If you delete the active preset (which should never happen) then recreate it.
- if (name == gSavedSettings.getString("PresetGraphicActive"))
- {
- LLPresetsManager::getInstance()->savePreset(mSubdirectory, PRESETS_DEFAULT);
- }
- }
- else
+ if (!LLPresetsManager::getInstance()->deletePreset(mSubdirectory, name))
{
LLSD args;
args["NAME"] = name;
LLNotificationsUtil::add("PresetNotDeleted", args);
}
+
+ closeFloater();
}
void LLFloaterDeletePrefPreset::onPresetsListChange()