Index: xfa/fwl/core/fwl_widgetimp.cpp |
diff --git a/xfa/fwl/core/fwl_widgetimp.cpp b/xfa/fwl/core/fwl_widgetimp.cpp |
index 52a2978908f6ec00e47ada2296b0ef1ad430ab6c..d84c5116da2cc0590a9f1dd046fe223a1f76d746 100644 |
--- a/xfa/fwl/core/fwl_widgetimp.cpp |
+++ b/xfa/fwl/core/fwl_widgetimp.cpp |
@@ -531,7 +531,7 @@ void CFWL_WidgetImp::SetAssociateWidget(void* pAssociate) { |
CFWL_WidgetImp::CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties, |
IFWL_Widget* pOuter) |
- : m_pProperties(new CFWL_WidgetImpProperties), |
+ : m_pProperties(new CFWL_WidgetImpProperties(properties)), |
m_pDelegate(nullptr), |
m_pCurDelegate(nullptr), |
m_pOuter(pOuter), |
@@ -540,14 +540,11 @@ CFWL_WidgetImp::CFWL_WidgetImp(const CFWL_WidgetImpProperties& properties, |
m_pAssociate(nullptr), |
m_iLock(0), |
m_nEventKey(0) { |
- *m_pProperties = properties; |
m_pWidgetMgr = CFWL_WidgetMgr::GetInstance(); |
Lei Zhang
2016/08/04 18:49:31
Can this also go on the initializer list?
Wei Li
2016/08/04 22:16:04
Done.
|
ASSERT(m_pWidgetMgr); |
} |
-CFWL_WidgetImp::~CFWL_WidgetImp() { |
- delete m_pProperties; |
-} |
+CFWL_WidgetImp::~CFWL_WidgetImp() {} |
FX_BOOL CFWL_WidgetImp::IsEnabled() const { |
return (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) == 0; |