diff options
author | James Cook <james@lindenlab.com> | 2009-10-27 16:26:49 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-10-27 16:26:49 -0700 |
commit | f80a3e268ad96de935c886adc2009ff5b2c880fc (patch) | |
tree | 5eaab1937ab4e24b2c3d896a9eb7ea5d7988c887 /indra/llui | |
parent | c3571b61fa8493b4298a6b1dc1f595a4077d1716 (diff) |
Revert change: Floater constructor CANNOT call LLPanel(p) with params, must set bg images in initFromParams, because we have too many LLPanels to retrofit them all to call LLPanel() with params. Discussed with Richard.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloater.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llpanel.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index f80e8df79f..ae5dd5a1ce 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -219,7 +219,7 @@ void LLFloater::initClass() static LLWidgetNameRegistry::StaticRegistrar sRegisterFloaterParams(&typeid(LLFloater::Params), "floater"); LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) -: LLPanel(p), +: LLPanel(), // intentionally do not pass params here, see initFromParams mDragHandle(NULL), mTitle(p.title), mShortTitle(p.short_title), @@ -2532,6 +2532,9 @@ void LLFloater::setupParamsForExport(Params& p, LLView* parent) void LLFloater::initFromParams(const LLFloater::Params& p) { + // *NOTE: We have too many classes derived from LLPanel to retrofit them + // all to pass in params via constructors. So we use this method. + // control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible LLPanel::initFromParams(p); diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index b53f7801cf..0d340699c5 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -107,6 +107,8 @@ LLPanel::LLPanel(const LLPanel::Params& p) mCommitCallbackRegistrar(false), mEnableCallbackRegistrar(false), mXMLFilename(p.filename) + // *NOTE: Be sure to also change LLPanel::initFromParams(). We have too + // many classes derived from LLPanel to retrofit them all to pass in params. { setIsChrome(FALSE); @@ -459,7 +461,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p) setBackgroundOpaque(p.background_opaque); setBackgroundColor(p.bg_opaque_color().get()); setTransparentColor(p.bg_alpha_color().get()); - + mBgOpaqueImage = p.bg_opaque_image(); + mBgAlphaImage = p.bg_alpha_image(); } static LLFastTimer::DeclareTimer FTM_PANEL_SETUP("Panel Setup"); |