, m_border( border )
, m_flag( flag )
, m_show( TRUE ) // Cannot be changed
- , m_deleteItem( FALSE ) // unused for spacer
, m_userData( userData )
{
SetRatio( m_size );
, m_border( border )
, m_flag( flag )
, m_show( TRUE )
- , m_deleteItem( FALSE ) // currently unused for window
, m_userData( userData )
{
// aspect ratio calculated from initial size
, m_flag( flag )
, m_show( TRUE )
, m_ratio( 0 )
- , m_deleteItem( TRUE ) // we delete sizer items by default.
, m_userData( userData )
{
// m_minSize is calculated later
wxSizerItem::~wxSizerItem()
{
- // User data is bound to the sizeritem, always delete it.
if (m_userData)
delete m_userData;
-
- // To be able to Detach a sizer, we must be able to veto its deletion here.
- if (m_deleteItem && m_sizer)
+ if (m_sizer)
delete m_sizer;
}
wxSizerItem *item = (wxSizerItem*)node->Data();
if (item->GetSizer() == sizer)
{
- item->SetDeleteItem( FALSE );
+ item->DetachSizer();
m_children.DeleteNode( node );
return TRUE;
}
wxNode *node = m_children.Nth( pos );
if (!node) return FALSE;
- ( (wxSizerItem*)node->Data() )->SetDeleteItem( FALSE );
+ ( (wxSizerItem*)node->Data() )->DetachSizer();
m_children.DeleteNode( node );
return TRUE;