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:
Julian Smart 2006-03-11 13:24:07 +00:00
parent e7b8da226f
commit b6e5dfeff3
2 changed files with 9 additions and 8 deletions

View File

@ -18,7 +18,10 @@ class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase
{
public:
// ctors and such
wxListBox();
wxListBox()
{
Init();
}
wxListBox( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
@ -27,9 +30,7 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr )
{
#if wxUSE_CHECKLISTBOX
m_hasCheckBoxes = FALSE;
#endif // wxUSE_CHECKLISTBOX
Init();
Create(parent, id, pos, size, n, choices, style, validator, name);
}
wxListBox( wxWindow *parent, wxWindowID id,
@ -40,13 +41,13 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr )
{
#if wxUSE_CHECKLISTBOX
m_hasCheckBoxes = FALSE;
#endif // wxUSE_CHECKLISTBOX
Init();
Create(parent, id, pos, size, choices, style, validator, name);
}
virtual ~wxListBox();
void Init(); //common construction
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,

View File

@ -419,7 +419,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
// construction
// ----------------------------------------------------------------------------
wxListBox::wxListBox()
void wxListBox::Init()
{
m_treeview = (GtkTreeView*) NULL;
#if wxUSE_CHECKLISTBOX