// Created: 2004-09-25
// RCS-ID: $Id$
// Copyright: (c) Jaakko Salli
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
wxPGEditor)
-// Trivial destructor.
+// Destructor. It is useful to reset the global pointer in it.
wxPGSpinCtrlEditor::~wxPGSpinCtrlEditor()
{
+ wxPG_EDITOR(SpinCtrl) = NULL;
}
-
// Create controls and initialize event handling.
wxPGWindowList wxPGSpinCtrlEditor::CreateControls( wxPropertyGrid* propgrid, wxPGProperty* property,
const wxPoint& pos, const wxSize& sz ) const
wxPGDatePickerCtrlEditor::~wxPGDatePickerCtrlEditor()
{
+ wxPG_EDITOR(DatePickerCtrl) = NULL;
}
wxPGWindowList wxPGDatePickerCtrlEditor::CreateControls( wxPropertyGrid* propgrid,
wxFileProperty::OnSetValue();
// Delete old image
- if ( m_pImage )
- {
- delete m_pImage;
- m_pImage = NULL;
- }
- if ( m_pBitmap )
- {
- delete m_pBitmap;
- m_pBitmap = NULL;
- }
+ wxDELETE(m_pImage);
+ wxDELETE(m_pBitmap);
wxFileName filename = GetFileName();
{
m_pImage->Rescale( rect.width, rect.height );
m_pBitmap = new wxBitmap( *m_pImage );
- delete m_pImage;
- m_pImage = NULL;
+ wxDELETE(m_pImage);
}
dc.DrawBitmap( *m_pBitmap, rect.x, rect.y, false );