summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpresetspulldown.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-09-28 15:00:17 -0400
committerOz Linden <oz@lindenlab.com>2015-09-28 15:00:17 -0400
commit453dee2d21477ad534fa9982b844c40adde9b93e (patch)
treef98fbe8c5bd501cd4618f52a4d02ebd4718b54cf /indra/newview/llpanelpresetspulldown.cpp
parente1ce065b8b2f4a01a166ddd90ef7c873e04d0893 (diff)
MAINT-5542: fix initialization of Default graphics preset so that it is selectable
Diffstat (limited to 'indra/newview/llpanelpresetspulldown.cpp')
-rw-r--r--indra/newview/llpanelpresetspulldown.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp
index a0bd8f5ad0..ed67c34bd6 100644
--- a/indra/newview/llpanelpresetspulldown.cpp
+++ b/indra/newview/llpanelpresetspulldown.cpp
@@ -59,9 +59,10 @@ LLPanelPresetsPulldown::LLPanelPresetsPulldown()
BOOL LLPanelPresetsPulldown::postBuild()
{
- LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLPanelPresetsPulldown::populatePanel, this));
+ LLPresetsManager* presetsMgr = LLPresetsManager::getInstance();
+ presetsMgr->setPresetListChangeCallback(boost::bind(&LLPanelPresetsPulldown::populatePanel, this));
// Make sure there is a default preference file
- LLPresetsManager::getInstance()->createMissingDefault();
+ presetsMgr->createMissingDefault();
populatePanel();
@@ -82,7 +83,8 @@ void LLPanelPresetsPulldown::populatePanel()
for (std::list<std::string>::const_iterator it = mPresetNames.begin(); it != mPresetNames.end(); ++it)
{
const std::string& name = *it;
-
+ LL_DEBUGS() << "adding '" << name << "'" << LL_ENDL;
+
LLSD row;
row["columns"][0]["column"] = "preset_name";
row["columns"][0]["value"] = name;
@@ -151,11 +153,20 @@ void LLPanelPresetsPulldown::onRowClick(const LLSD& user_data)
{
std::string name = item->getColumn(1)->getValue().asString();
+ LL_DEBUGS() << "selected '" << name << "'" << LL_ENDL;
LLPresetsManager::getInstance()->loadPreset(PRESETS_GRAPHIC, name);
setVisible(FALSE);
}
+ else
+ {
+ LL_DEBUGS() << "none selected" << LL_ENDL;
+ }
}
+ else
+ {
+ LL_DEBUGS() << "no scroll" << LL_ENDL;
+ }
}
void LLPanelPresetsPulldown::onGraphicsButtonClick(const LLSD& user_data)