diff options
author | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2017-04-29 16:03:54 +0000 |
---|---|---|
committer | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2017-04-29 16:03:54 +0000 |
commit | cb83424d2e57df9cefae7b1c73e1f68aa9521fa2 (patch) | |
tree | d7694e26b0f8c9b91328e1c4dd1a04877376f0ad | |
parent | a34cd32581bcead2720b41ed46a88d2d6a25f36d (diff) | |
download | fpc-cb83424d2e57df9cefae7b1c73e1f68aa9521fa2.tar.gz |
--- Merging r35607 into '.':
U rtl/objpas/classes/compon.inc
--- Recording mergeinfo for merge of r35607 into '.':
U .
# revisions: 35607
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/fixes_3_0@36013 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | rtl/objpas/classes/compon.inc | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/rtl/objpas/classes/compon.inc b/rtl/objpas/classes/compon.inc index 4a4b1d7416..c15285c331 100644 --- a/rtl/objpas/classes/compon.inc +++ b/rtl/objpas/classes/compon.inc @@ -291,21 +291,22 @@ end; Procedure TComponent.Notification(AComponent: TComponent; Operation: TOperation); -Var Runner : Longint; +Var + C : Longint; begin - If (Operation=opRemove) and Assigned(FFreeNotifies) then + If (Operation=opRemove) then + RemoveFreeNotification(AComponent); + If Not assigned(FComponents) then + exit; + C:=FComponents.Count-1; + While (C>=0) do begin - FFreeNotifies.Remove(AComponent); - If FFreeNotifies.Count=0 then - begin - FFreeNotifies.Free; - FFreenotifies:=Nil; - end; - end; - If assigned(FComponents) then - For Runner:=0 To FComponents.Count-1 do - TComponent(FComponents.Items[Runner]).Notification(AComponent,Operation); + TComponent(FComponents.Items[C]).Notification(AComponent,Operation); + Dec(C); + if C>=FComponents.Count then + C:=FComponents.Count-1; + end; end; |