mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-12 02:18:44 +02:00
Cocoa/ListView: fix the issue with empty TListView.Columns, issue #40632
This commit is contained in:
parent
bafbb1e6fa
commit
6e648e3c2e
@ -2724,9 +2724,11 @@ end;
|
||||
function TLCLListViewCallback.GetItemTextAt(ARow, ACol: Integer;
|
||||
var Text: String): Boolean;
|
||||
begin
|
||||
Result := (ACol>=0) and (ACol<listView.ColumnCount)
|
||||
Result := (ACol>=0) and ( (ACol<listView.ColumnCount) or (ACol=0) )
|
||||
and (ARow >= 0) and (ARow < listView.Items.Count);
|
||||
|
||||
if not Result then Exit;
|
||||
|
||||
if ACol = 0 then
|
||||
Text := listView.Items[ARow].Caption
|
||||
else
|
||||
@ -2753,7 +2755,7 @@ end;
|
||||
function TLCLListViewCallback.GetItemImageAt(ARow, ACol: Integer;
|
||||
var imgIdx: Integer): Boolean;
|
||||
begin
|
||||
Result := (ACol >= 0) and (ACol < listView.ColumnCount)
|
||||
Result := (ACol >= 0) and ( (ACol<listView.ColumnCount) or ( ACol=0) )
|
||||
and (ARow >= 0) and (ARow < listView.Items.Count);
|
||||
|
||||
if not Result then Exit;
|
||||
|
Loading…
Reference in New Issue
Block a user