cocoa: implementing customlistview.ItemGetState for lisSelected. bug #36074

git-svn-id: trunk@62157 -
This commit is contained in:
dmitry 2019-11-02 21:05:13 +00:00
parent 5ae8ccb465
commit 4d3b324f74

View File

@ -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;