Fix colored markup drawing in Mac wxDataViewCtrl

50ba73c accidentally omitted an if (colText) check, causing calls to
setTextColor:nil - which in turn caused markup text (but curiously, not
plain) rendering to stick with a previously set color even on cells
where the default color should be used.

Restoring the original logic to prevent setTextColor:nil fixes it.
This commit is contained in:
Václav Slavík
2020-08-26 19:28:32 +02:00
parent a59901f8f1
commit 9e68df224f

View File

@@ -2940,7 +2940,9 @@ void wxDataViewRenderer::SetAttr(const wxDataViewItemAttr& attr)
{ {
if ( !colText ) if ( !colText )
colText = data->GetOriginalTextColour(); colText = data->GetOriginalTextColour();
[(id)cell setTextColor:colText];
if ( colText )
[(id)cell setTextColor:colText];
} }
if ( [cell respondsToSelector:@selector(setDrawsBackground:)] ) if ( [cell respondsToSelector:@selector(setDrawsBackground:)] )