Refresh generic wxDataViewCtrl after disabling it

Grey the control out immediately, instead of waiting until the next
refresh to do it.

Closes #17887.
This commit is contained in:
mikek
2018-02-01 01:02:56 +01:00
committed by Vadim Zeitlin
parent bfd3f1b33f
commit 945cec4be1
2 changed files with 15 additions and 12 deletions

View File

@@ -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 ))