LCL: TCustomListView: allow programatically selection of items when OwnerData. issue #18202

git-svn-id: trunk@35243 -
This commit is contained in:
zeljko 2012-02-08 19:47:12 +00:00
parent c63e24b53b
commit 90c91e2666

View File

@ -487,7 +487,10 @@ end;
{------------------------------------------------------------------------------}
function TListItem.WSUpdateAllowed: Boolean;
begin
Result := (FFlags * [lifDestroying, lifCreated] = [lifCreated])
Result :=
( (FFlags * [lifDestroying, lifCreated] = [lifCreated]) or
((FFlags = []) and (FOwner <> nil) and (FOwner.FOwner <> nil) and
(FOwner.FOwner.OwnerData)) )
and (FOwner <> nil)
and FOwner.WSUpdateAllowed;
end;