diff options
author | Richard Linden <none@none> | 2011-09-06 14:45:11 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-09-06 14:45:11 -0700 |
commit | b183b6f1413f2f534633f021480ccc4570235f2d (patch) | |
tree | 81c4501960ae728242c96299bcd2e4b43ec2b73d /indra/llui/lluictrlfactory.h | |
parent | 2154bccdc4ef79bc2d593daad85d1344e9177bcf (diff) |
EXP-1196 FIX Fix param block template ordering
changed ordering of template loading relative to constructor setting of params
moved a lot of constructor-set params to template files
reviewed by Leslie
Diffstat (limited to 'indra/llui/lluictrlfactory.h')
-rw-r--r-- | indra/llui/lluictrlfactory.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 499b97f52d..f0ba7fc7d7 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -104,14 +104,17 @@ private: public: ParamDefaults() { - // recursively initialize from base class param block - ((typename PARAM_BLOCK::base_block_t&)mPrototype).fillFrom(ParamDefaults<typename PARAM_BLOCK::base_block_t, DUMMY>::instance().get()); - // after initializing base classes, look up template file for this param block + // look up template file for this param block... const std::string* param_block_tag = getWidgetTag(&typeid(PARAM_BLOCK)); if (param_block_tag) - { - LLUICtrlFactory::loadWidgetTemplate(*param_block_tag, mPrototype); + { // ...and if it exists, back fill values using the most specific template first + PARAM_BLOCK params; + LLUICtrlFactory::loadWidgetTemplate(*param_block_tag, params); + mPrototype.fillFrom(params); } + // recursively fill from base class param block + ((typename PARAM_BLOCK::base_block_t&)mPrototype).fillFrom(ParamDefaults<typename PARAM_BLOCK::base_block_t, DUMMY>::instance().get()); + } const PARAM_BLOCK& get() { return mPrototype; } |