mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 23:29:16 +02:00
cocoa: implementing customlistview.ItemGetState for lisSelected. bug #36074
git-svn-id: trunk@62157 -
This commit is contained in:
parent
5ae8ccb465
commit
4d3b324f74
@ -1220,8 +1220,21 @@ end;
|
||||
class function TCocoaWSCustomListView.ItemGetState(const ALV: TCustomListView;
|
||||
const AIndex: Integer; const AItem: TListItem; const AState: TListItemState;
|
||||
out AIsSet: Boolean): Boolean;
|
||||
var
|
||||
lCocoaLV: TCocoaListView;
|
||||
lTableLV: TCocoaTableListView;
|
||||
lclcb: TLCLListViewCallback;
|
||||
begin
|
||||
Result:=inherited ItemGetState(ALV, AIndex, AItem, AState, AIsSet);
|
||||
case AState of
|
||||
lisSelected: begin
|
||||
Result := false;
|
||||
if not CheckParamsCb(lCocoaLV, lTableLV, lclcb, ALV) then Exit;
|
||||
Result := (AIndex>=0) and (AIndex <= lTableLV.numberOfRows);
|
||||
AIsSet := lTableLV.isRowSelected(AIndex);
|
||||
end;
|
||||
else
|
||||
Result := inherited ItemGetState(ALV, AIndex, AItem, AState, AIsSet);
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomListView.ItemInsert(const ALV: TCustomListView;
|
||||
|
Loading…
Reference in New Issue
Block a user