wxSlider should now display int values,
Corrected garbage deletion in dnd sample. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1185,8 +1185,6 @@ DnDShapeFrame::DnDShapeFrame(wxFrame *parent)
|
|||||||
: wxFrame(parent, -1, "Shape Frame",
|
: wxFrame(parent, -1, "Shape Frame",
|
||||||
wxDefaultPosition, wxSize(250, 150))
|
wxDefaultPosition, wxSize(250, 150))
|
||||||
{
|
{
|
||||||
SetBackgroundColour(*wxWHITE);
|
|
||||||
|
|
||||||
CreateStatusBar();
|
CreateStatusBar();
|
||||||
|
|
||||||
wxMenu *menuShape = new wxMenu;
|
wxMenu *menuShape = new wxMenu;
|
||||||
@@ -1210,16 +1208,20 @@ DnDShapeFrame::DnDShapeFrame(wxFrame *parent)
|
|||||||
SetDropTarget(new DnDShapeDropTarget(this));
|
SetDropTarget(new DnDShapeDropTarget(this));
|
||||||
|
|
||||||
m_shape = NULL;
|
m_shape = NULL;
|
||||||
|
|
||||||
|
SetBackgroundColour(*wxWHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
DnDShapeFrame::~DnDShapeFrame()
|
DnDShapeFrame::~DnDShapeFrame()
|
||||||
{
|
{
|
||||||
delete m_shape;
|
if (m_shape)
|
||||||
|
delete m_shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DnDShapeFrame::SetShape(DnDShape *shape)
|
void DnDShapeFrame::SetShape(DnDShape *shape)
|
||||||
{
|
{
|
||||||
delete m_shape;
|
if (m_shape)
|
||||||
|
delete m_shape;
|
||||||
m_shape = shape;
|
m_shape = shape;
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
@@ -112,6 +112,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
if (style & wxSL_LABELS)
|
if (style & wxSL_LABELS)
|
||||||
{
|
{
|
||||||
gtk_scale_set_draw_value( GTK_SCALE( m_widget ), TRUE );
|
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
|
/* labels need more space and too small window will
|
||||||
cause junk to appear on the dialog */
|
cause junk to appear on the dialog */
|
||||||
|
@@ -112,6 +112,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
if (style & wxSL_LABELS)
|
if (style & wxSL_LABELS)
|
||||||
{
|
{
|
||||||
gtk_scale_set_draw_value( GTK_SCALE( m_widget ), TRUE );
|
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
|
/* labels need more space and too small window will
|
||||||
cause junk to appear on the dialog */
|
cause junk to appear on the dialog */
|
||||||
|
Reference in New Issue
Block a user