diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h index f4ebc64cae..5efc0e1eec 100644 --- a/include/wx/generic/dataview.h +++ b/include/wx/generic/dataview.h @@ -257,10 +257,10 @@ public: #if wxUSE_ACCESSIBILITY virtual bool Show(bool show = true) wxOVERRIDE; - virtual bool Enable(bool enable = true) wxOVERRIDE; virtual void SetName(const wxString &name) wxOVERRIDE; virtual bool Reparent(wxWindowBase *newParent) wxOVERRIDE; #endif // wxUSE_ACCESSIBILITY + virtual bool Enable(bool enable = true) wxOVERRIDE; virtual bool AllowMultiColumnSort(bool allow) wxOVERRIDE; virtual bool IsMultiColumnSortAllowed() const wxOVERRIDE { return m_allowMultiColumnSort; } diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 9a4f08276e..34fdcc7409 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -5228,17 +5228,6 @@ bool wxDataViewCtrl::Show(bool show) return changed; } -bool wxDataViewCtrl::Enable(bool enable) -{ - bool changed = wxControl::Enable(enable); - if ( changed ) - { - wxAccessible::NotifyEvent(wxACC_EVENT_OBJECT_STATECHANGE, this, wxOBJID_CLIENT, wxACC_SELF); - } - - return changed; -} - void wxDataViewCtrl::SetName(const wxString &name) { wxControl::SetName(name); @@ -5257,6 +5246,20 @@ bool wxDataViewCtrl::Reparent(wxWindowBase *newParent) } #endif // wxUSE_ACCESIBILITY +bool wxDataViewCtrl::Enable(bool enable) +{ + bool changed = wxControl::Enable(enable); + if ( changed ) + { +#if wxUSE_ACCESSIBILITY + wxAccessible::NotifyEvent(wxACC_EVENT_OBJECT_STATECHANGE, this, wxOBJID_CLIENT, wxACC_SELF); +#endif // wxUSE_ACCESIBILITY + Refresh(); + } + + return changed; +} + bool wxDataViewCtrl::AssociateModel( wxDataViewModel *model ) { if (!wxDataViewCtrlBase::AssociateModel( model ))