diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index f0fe76f904..eee1decc30 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -1185,8 +1185,6 @@ DnDShapeFrame::DnDShapeFrame(wxFrame *parent) : wxFrame(parent, -1, "Shape Frame", wxDefaultPosition, wxSize(250, 150)) { - SetBackgroundColour(*wxWHITE); - CreateStatusBar(); wxMenu *menuShape = new wxMenu; @@ -1210,16 +1208,20 @@ DnDShapeFrame::DnDShapeFrame(wxFrame *parent) SetDropTarget(new DnDShapeDropTarget(this)); m_shape = NULL; + + SetBackgroundColour(*wxWHITE); } DnDShapeFrame::~DnDShapeFrame() { - delete m_shape; + if (m_shape) + delete m_shape; } void DnDShapeFrame::SetShape(DnDShape *shape) { - delete m_shape; + if (m_shape) + delete m_shape; m_shape = shape; Refresh(); } diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index c611e0e480..996c428eaa 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -112,6 +112,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, 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 */ diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index c611e0e480..996c428eaa 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -112,6 +112,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, 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 */