Applied patch [ 1447666 ] Fix obscure GTK wxListBox construction bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -18,7 +18,10 @@ class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// ctors and such
|
// ctors and such
|
||||||
wxListBox();
|
wxListBox()
|
||||||
|
{
|
||||||
|
Init();
|
||||||
|
}
|
||||||
wxListBox( wxWindow *parent, wxWindowID id,
|
wxListBox( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
@@ -27,9 +30,7 @@ public:
|
|||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxListBoxNameStr )
|
const wxString& name = wxListBoxNameStr )
|
||||||
{
|
{
|
||||||
#if wxUSE_CHECKLISTBOX
|
Init();
|
||||||
m_hasCheckBoxes = FALSE;
|
|
||||||
#endif // wxUSE_CHECKLISTBOX
|
|
||||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||||
}
|
}
|
||||||
wxListBox( wxWindow *parent, wxWindowID id,
|
wxListBox( wxWindow *parent, wxWindowID id,
|
||||||
@@ -40,13 +41,13 @@ public:
|
|||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxListBoxNameStr )
|
const wxString& name = wxListBoxNameStr )
|
||||||
{
|
{
|
||||||
#if wxUSE_CHECKLISTBOX
|
Init();
|
||||||
m_hasCheckBoxes = FALSE;
|
|
||||||
#endif // wxUSE_CHECKLISTBOX
|
|
||||||
Create(parent, id, pos, size, choices, style, validator, name);
|
Create(parent, id, pos, size, choices, style, validator, name);
|
||||||
}
|
}
|
||||||
virtual ~wxListBox();
|
virtual ~wxListBox();
|
||||||
|
|
||||||
|
void Init(); //common construction
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
|
@@ -419,7 +419,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
|
|||||||
// construction
|
// construction
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxListBox::wxListBox()
|
void wxListBox::Init()
|
||||||
{
|
{
|
||||||
m_treeview = (GtkTreeView*) NULL;
|
m_treeview = (GtkTreeView*) NULL;
|
||||||
#if wxUSE_CHECKLISTBOX
|
#if wxUSE_CHECKLISTBOX
|
||||||
|
Reference in New Issue
Block a user