2
0
Эх сурвалжийг харах

* Put Collection.Assign loop in beginupdate/endupdate (bug ID 33517)

git-svn-id: trunk@38628 -
michael 7 жил өмнө
parent
commit
6d49a7b93f

+ 8 - 3
rtl/objpas/classes/collect.inc

@@ -325,9 +325,14 @@ Var I : Longint;
 begin
   If Source is TCollection then
     begin
-    Clear;
-    For I:=0 To TCollection(Source).Count-1 do
-     Add.Assign(TCollection(Source).Items[I]);
+    BeginUpdate;
+    try
+      Clear;
+      For I:=0 To TCollection(Source).Count-1 do
+       Add.Assign(TCollection(Source).Items[I]);
+    finally
+      EndUpdate;
+    end;
     exit;
     end
   else