summaryrefslogtreecommitdiff
path: root/indra/llui/lluiimage.cpp
diff options
context:
space:
mode:
authorrichard <none@none>2009-12-17 10:01:55 -0800
committerrichard <none@none>2009-12-17 10:01:55 -0800
commit9ff869a6b287a2b4b8c94219584d1c7b66ebb399 (patch)
tree51c3bccd75e8daf7bd10c31ee6fddbc0c823a092 /indra/llui/lluiimage.cpp
parente8fe81c4fcbec173606b5ad635e0b774e4d8b24b (diff)
Backed out changeset: 4d482c1ed041
Diffstat (limited to 'indra/llui/lluiimage.cpp')
-rw-r--r--indra/llui/lluiimage.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/llui/lluiimage.cpp b/indra/llui/lluiimage.cpp
index f941f391eb..1dfc281d93 100644
--- a/indra/llui/lluiimage.cpp
+++ b/indra/llui/lluiimage.cpp
@@ -161,22 +161,32 @@ void LLUIImage::onImageLoaded()
namespace LLInitParam
{
- LLUIImage* TypedParam<LLUIImage*>::getValueFromBlock() const
+ void TypedParam<LLUIImage*>::setValueFromBlock() const
{
// The keyword "none" is specifically requesting a null image
// do not default to current value. Used to overwrite template images.
if (name() == "none")
{
- return NULL;
+ mData.mValue = NULL;
}
LLUIImage* imagep = LLUI::getUIImage(name());
- if (!imagep)
+ if (imagep)
{
- // default to current value
- imagep = mData.mValue;
+ mData.mValue = imagep;
+ }
+ }
+
+ void TypedParam<LLUIImage*>::setBlockFromValue()
+ {
+ if (mData.mValue == NULL)
+ {
+ name = "none";
+ }
+ else
+ {
+ name = mData.mValue->getName();
}
- return imagep;
}