Fixes displaying disabled wxDataViewItem with native appearance

Causes the wxCONTROL_DISABLED flag to be set based on the results of the wxDataViewModel's IsEnabled() method.
This commit is contained in:
donovan6000
2019-03-24 23:32:55 -07:00
committed by GitHub
parent 3d45374200
commit d7f3f96cac

View File

@@ -1067,7 +1067,7 @@ wxDataViewCustomRendererBase::RenderText(const wxString& text,
int flags = 0;
if ( state & wxDATAVIEW_CELL_SELECTED )
flags |= wxCONTROL_SELECTED;
if ( !GetOwner()->GetOwner()->IsEnabled() )
if ( !GetEnabled() )
flags |= wxCONTROL_DISABLED;
// Notice that we intentionally don't use any alignment here: it is not