diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-12-18 16:08:39 -0800 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-12-18 16:08:39 -0800 |
| commit | aa7efb7540d9eed9d8832bb65c52c3fdb1b811c8 (patch) | |
| tree | d74df2438d1d62b6c2c683a12bcd42d8dee6e41b /indra/llui/lluiimage.cpp | |
| parent | 043407238a4162c0d20413338cf6a7088be1f674 (diff) | |
| parent | 4964ca39f14531630ffbfece593f8ba9cdc86e4e (diff) | |
merge.
Diffstat (limited to 'indra/llui/lluiimage.cpp')
| -rw-r--r-- | indra/llui/lluiimage.cpp | 22 |
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; } |
