mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 18:20:03 +02:00
cocoa: do not call DrawItem for readonly dropdown if no item is not selected. #21791
git-svn-id: trunk@60950 -
This commit is contained in:
parent
1dc66309d3
commit
8b19c6735e
@ -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<list.Count)
|
||||
then
|
||||
begin
|
||||
ctx := TCocoaContext.Create(NSGraphicsContext.currentContext);
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user