From 9e68df224fa4cef324cf4547ccf0f10b7ab54a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Wed, 26 Aug 2020 19:28:32 +0200 Subject: [PATCH] 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. --- src/osx/cocoa/dataview.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index 21a18323fb..24577504e2 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -2940,7 +2940,9 @@ void wxDataViewRenderer::SetAttr(const wxDataViewItemAttr& attr) { if ( !colText ) colText = data->GetOriginalTextColour(); - [(id)cell setTextColor:colText]; + + if ( colText ) + [(id)cell setTextColor:colText]; } if ( [cell respondsToSelector:@selector(setDrawsBackground:)] )