diff --git a/include/wx/gtk/dataview.h b/include/wx/gtk/dataview.h index 8ed57ec0d8..589da74a9a 100644 --- a/include/wx/gtk/dataview.h +++ b/include/wx/gtk/dataview.h @@ -414,18 +414,18 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator ) { + Init(); + Create(parent, id, pos, size, style, validator ); } - virtual ~wxDataViewCtrl(); - - void Init(); - bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator ); + virtual ~wxDataViewCtrl(); + virtual bool AssociateModel( wxDataViewModel *model ); virtual bool PrependColumn( wxDataViewColumn *col ); @@ -481,6 +481,8 @@ protected: virtual void DoApplyWidgetStyle(GtkRcStyle *style); private: + void Init(); + friend class wxDataViewCtrlDCImpl; friend class wxDataViewColumn; friend class wxGtkDataViewModelNotifier; diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 62fbd52fe2..5bb7d75031 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -4111,8 +4111,6 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator ) { - Init(); - if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, validator )) {