diff options
| author | richard <none@none> | 2009-12-15 19:33:18 -0800 |
|---|---|---|
| committer | richard <none@none> | 2009-12-15 19:33:18 -0800 |
| commit | 3a02b9ec882c98009ae6c24913ee8a7a620b0f87 (patch) | |
| tree | 51c3bccd75e8daf7bd10c31ee6fddbc0c823a092 /indra/llui/lluiimage.cpp | |
| parent | cda1598fd6e17e0c0b641c73c540d8c898f2798f (diff) | |
added setBlockFromValue so setting a LLRect param in code will set the individual left, right, top, bottom values, for example
don't call setupParams when creating widgets from code
moved Multiple param constraints into BaseBlock to remove extra scoping
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; } |
