mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-01 04:09:21 +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);
|
inherited drawRect(dirtyRect);
|
||||||
|
|
||||||
// if ownerDrawn style, then need to call "DrawItem" event
|
// 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
|
begin
|
||||||
ctx := TCocoaContext.Create(NSGraphicsContext.currentContext);
|
ctx := TCocoaContext.Create(NSGraphicsContext.currentContext);
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user