diff options
author | Jonathan Yap <jhwelch@gmail.com> | 2014-11-30 11:24:22 -0500 |
---|---|---|
committer | Jonathan Yap <jhwelch@gmail.com> | 2014-11-30 11:24:22 -0500 |
commit | 563e22e81c6bf14bca6370b098a257f94f4f843f (patch) | |
tree | 4835333aa4dadfbc1ce37224ed40f6b2a12bc56b /indra/newview/llfloaterdeleteprefpreset.cpp | |
parent | 34a79a6ece28fbc560bde907142ecaadf95e910f (diff) |
STORM-2082 Make code more generic to handle the future camera presets.
Diffstat (limited to 'indra/newview/llfloaterdeleteprefpreset.cpp')
-rw-r--r-- | indra/newview/llfloaterdeleteprefpreset.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp index 5dc51c4223..bef5b4e3bf 100644 --- a/indra/newview/llfloaterdeleteprefpreset.cpp +++ b/indra/newview/llfloaterdeleteprefpreset.cpp @@ -49,14 +49,14 @@ BOOL LLFloaterDeletePrefPreset::postBuild() void LLFloaterDeletePrefPreset::onOpen(const LLSD& key) { - std::string param = key.asString(); - std::string floater_title = getString(std::string("title_") + param); + std::string mSubdirectory = key.asString(); + std::string floater_title = getString(std::string("title_") + mSubdirectory); setTitle(floater_title); LLComboBox* combo = getChild<LLComboBox>("preset_combo"); - LLPresetsManager::getInstance()->setPresetNamesInComboBox(combo); + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo); } void LLFloaterDeletePrefPreset::onBtnDelete() @@ -64,6 +64,7 @@ void LLFloaterDeletePrefPreset::onBtnDelete() LLComboBox* combo = getChild<LLComboBox>("preset_combo"); std::string name = combo->getSimple(); + // Ignore return status LLPresetsManager::getInstance()->deletePreset(name); } @@ -71,7 +72,7 @@ void LLFloaterDeletePrefPreset::onPresetsListChange() { LLComboBox* combo = getChild<LLComboBox>("preset_combo"); - LLPresetsManager::getInstance()->setPresetNamesInComboBox(combo); + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo); } void LLFloaterDeletePrefPreset::onBtnCancel() |