lcl: allow ItemChanged event for OwnerData listview

git-svn-id: trunk@22284 -
This commit is contained in:
paul 2009-10-26 07:17:16 +00:00
parent 391e491deb
commit 833166cbd0
2 changed files with 2 additions and 3 deletions

View File

@ -224,10 +224,9 @@ begin
//Check
end;
LVN_ITEMCHANGED: begin
if OwnerData then Exit;
Item := Items[nm^.iItem];
//DebugLn('TCustomListView.CNNotify Count=',dbgs(Items.Count),' nm^.iItem=',dbgs(nm^.iItem),' destroying=',dbgs(lifDestroying in Item.FFlags));
if (lifDestroying in Item.FFlags) then begin
if (Item <> nil) and (not OwnerData) and (lifDestroying in Item.FFlags) then begin
if Item=FFocused then
FFocused:=nil;
if Item=FSelected then

View File

@ -65,7 +65,7 @@ begin
end
else
begin
if (AIndex < 0) or (AIndex >= FItems.Count) then
if (AIndex >= FItems.Count) then
begin
Result := nil;
Exit;