From 9b98a2bcfdcd8e7f6f06bb7aeab3261b75382a95 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 19 Mar 2012 12:53:25 +0000 Subject: [PATCH] Fix appearance of items without icons in wxDataViewCtrl in wxOSX/Cocoa. We need to set the cell image to none explicitly if the item doesn't have any, otherwise the image for the previous cell would be reused. Closes #14112. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/dataview.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index ad8dfe54ec..9d2fabdc42 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -2995,6 +2995,8 @@ bool wxDataViewIconTextRenderer::MacRender() iconText << GetValue(); if (iconText.GetIcon().IsOk()) [cell setImage:[[wxBitmap(iconText.GetIcon()).GetNSImage() retain] autorelease]]; + else + [cell setImage:nil]; [cell setStringValue:[[wxCFStringRef(iconText.GetText()).AsNSString() retain] autorelease]]; return true; } -- 2.50.0