summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterdeleteprefpreset.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-05-18 23:29:31 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-05-18 23:29:31 +0300
commitd23e6491691be7f1937b78910e7c20b7741a890c (patch)
tree103292a54ca089d9a0ad9a653ffc53ddee1407f4 /indra/newview/llfloaterdeleteprefpreset.cpp
parent53da10525ed0e7b2dc78d40ad20313d98310d1cf (diff)
parented3d9abdd01304b5a9708880d9b150fb6568256b (diff)
Merged master into DRTVWR-508
Diffstat (limited to 'indra/newview/llfloaterdeleteprefpreset.cpp')
-rw-r--r--indra/newview/llfloaterdeleteprefpreset.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp
index 7dedbbf984..0765756b43 100644
--- a/indra/newview/llfloaterdeleteprefpreset.cpp
+++ b/indra/newview/llfloaterdeleteprefpreset.cpp
@@ -60,13 +60,15 @@ void LLFloaterDeletePrefPreset::onOpen(const LLSD& key)
{
mSubdirectory = key.asString();
std::string floater_title = getString(std::string("title_") + mSubdirectory);
-
setTitle(floater_title);
LLComboBox* combo = getChild<LLComboBox>("preset_combo");
-
EDefaultOptions option = DEFAULT_HIDE;
- LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option);
+ bool action;
+ action = LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option);
+
+ LLButton* delete_btn = getChild<LLButton>("delete");
+ delete_btn->setEnabled(action);
}
void LLFloaterDeletePrefPreset::onBtnDelete()
@@ -80,6 +82,13 @@ void LLFloaterDeletePrefPreset::onBtnDelete()
args["NAME"] = name;
LLNotificationsUtil::add("PresetNotDeleted", args);
}
+ else if (mSubdirectory == PRESETS_CAMERA)
+ {
+ if (gSavedSettings.getString("PresetCameraActive") == name)
+ {
+ gSavedSettings.setString("PresetCameraActive", "");
+ }
+ }
closeFloater();
}
@@ -87,12 +96,10 @@ void LLFloaterDeletePrefPreset::onBtnDelete()
void LLFloaterDeletePrefPreset::onPresetsListChange()
{
LLComboBox* combo = getChild<LLComboBox>("preset_combo");
- LLButton* delete_btn = getChild<LLButton>("delete");
EDefaultOptions option = DEFAULT_HIDE;
- LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option);
- delete_btn->setEnabled(0 != combo->getItemCount());
+ LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option);
}
void LLFloaterDeletePrefPreset::onBtnCancel()