From 8b19c6735edd88dc95082468720c5508e8641038 Mon Sep 17 00:00:00 2001 From: dmitry Date: Sat, 13 Apr 2019 04:41:54 +0000 Subject: [PATCH] cocoa: do not call DrawItem for readonly dropdown if no item is not selected. #21791 git-svn-id: trunk@60950 - --- lcl/interfaces/cocoa/cocoatextedits.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/cocoa/cocoatextedits.pas b/lcl/interfaces/cocoa/cocoatextedits.pas index cd87db51fa..5da5d381ca 100644 --- a/lcl/interfaces/cocoa/cocoatextedits.pas +++ b/lcl/interfaces/cocoa/cocoatextedits.pas @@ -1463,7 +1463,9 @@ begin inherited drawRect(dirtyRect); // if ownerDrawn style, then need to call "DrawItem" event - if isOwnerDrawn and Assigned(callback) then + if isOwnerDrawn and Assigned(callback) + and (lastSelectedItemIndex>=0) and (lastSelectedItemIndex