Corrected garbage deletion in dnd sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4110
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
: wxFrame(parent, -1, "Shape Frame",
wxDefaultPosition, wxSize(250, 150))
{
: wxFrame(parent, -1, "Shape Frame",
wxDefaultPosition, wxSize(250, 150))
{
- SetBackgroundColour(*wxWHITE);
-
CreateStatusBar();
wxMenu *menuShape = new wxMenu;
CreateStatusBar();
wxMenu *menuShape = new wxMenu;
SetDropTarget(new DnDShapeDropTarget(this));
m_shape = NULL;
SetDropTarget(new DnDShapeDropTarget(this));
m_shape = NULL;
+
+ SetBackgroundColour(*wxWHITE);
}
DnDShapeFrame::~DnDShapeFrame()
{
}
DnDShapeFrame::~DnDShapeFrame()
{
+ if (m_shape)
+ delete m_shape;
}
void DnDShapeFrame::SetShape(DnDShape *shape)
{
}
void DnDShapeFrame::SetShape(DnDShape *shape)
{
+ if (m_shape)
+ delete m_shape;
m_shape = shape;
Refresh();
}
m_shape = shape;
Refresh();
}
if (style & wxSL_LABELS)
{
gtk_scale_set_draw_value( GTK_SCALE( m_widget ), TRUE );
if (style & wxSL_LABELS)
{
gtk_scale_set_draw_value( GTK_SCALE( m_widget ), TRUE );
+ gtk_scale_set_digits( GTK_SCALE( m_widget ), 0 );
/* labels need more space and too small window will
cause junk to appear on the dialog */
/* labels need more space and too small window will
cause junk to appear on the dialog */
if (style & wxSL_LABELS)
{
gtk_scale_set_draw_value( GTK_SCALE( m_widget ), TRUE );
if (style & wxSL_LABELS)
{
gtk_scale_set_draw_value( GTK_SCALE( m_widget ), TRUE );
+ gtk_scale_set_digits( GTK_SCALE( m_widget ), 0 );
/* labels need more space and too small window will
cause junk to appear on the dialog */
/* labels need more space and too small window will
cause junk to appear on the dialog */