|
@@ -215,9 +215,15 @@ end;
|
|
|
|
|
|
|
|
|
procedure TCollection.RemoveItem(Item: TCollectionItem);
|
|
|
+
|
|
|
+Var
|
|
|
+ I : Integer;
|
|
|
+
|
|
|
begin
|
|
|
- Notify(Item,cnExtracting);
|
|
|
- FItems.Remove(Pointer(Item));
|
|
|
+ Notify(Item,cnExtracting);
|
|
|
+ I:=FItems.IndexOfItem(Item,fromEnd);
|
|
|
+ If (I<>-1) then
|
|
|
+ FItems.Delete(I);
|
|
|
Item.FCollection:=Nil;
|
|
|
Changed;
|
|
|
end;
|