summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-03-17 15:57:15 -0700
committerdolphin <dolphin@lindenlab.com>2014-03-17 15:57:15 -0700
commit74dcc04e69b845e62d25e83b615399f8a5d26d21 (patch)
tree7b951b6c770cb41d4f5787f92d828cf5e5b86bd5 /indra/newview
parente10ae3ba960cf030582378c454937dd326fcd436 (diff)
Updated experience cache to get a const reference to xp data
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llpreviewscript.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index e59c1c21f6..a4798f3911 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1319,6 +1319,7 @@ void LLLiveLSLEditor::updateExperiencePanel()
mExperienceEnabled->setToolTip(getString("experience_enabled"));
mExperienceEnabled->setEnabled(getIsModifiable());
mExperiences->setVisible(TRUE);
+ mExperienceEnabled->set(TRUE);
buildExperienceList();
}
}
@@ -1328,7 +1329,6 @@ void LLLiveLSLEditor::buildExperienceList()
mExperiences->clearRows();
bool foundAssociated=false;
const LLUUID& associated = mScriptEd->getAssociatedExperience();
- LLSD experience;
LLUUID last;
LLScrollListItem* item;
for(LLSD::array_const_iterator it = mExperienceIds.beginArray(); it != mExperienceIds.endArray(); ++it)
@@ -1340,21 +1340,23 @@ void LLLiveLSLEditor::buildExperienceList()
foundAssociated = true;
position = ADD_TOP;
}
- if(LLExperienceCache::get(id, experience))
- {
- mExperiences->add(experience[LLExperienceCache::NAME].asString(), id, position);
- }
- else
+
+ const LLSD& experience = LLExperienceCache::get(id);
+ if(experience.isUndefined())
{
mExperiences->add(getString("loading"), id, position);
last = id;
}
-
+ else
+ {
+ mExperiences->add(experience[LLExperienceCache::NAME].asString(), id, position);
+ }
}
if(!foundAssociated )
- {
- if(LLExperienceCache::get(associated, experience))
+ {
+ const LLSD& experience = LLExperienceCache::get(associated);
+ if(experience.isDefined())
{
item=mExperiences->add(experience[LLExperienceCache::NAME].asString(), associated, ADD_TOP);
}