From 0a4bc2102394af6d6a981304f99ce42acbd6664f Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Fri, 15 May 2015 13:50:08 +0200 Subject: [PATCH] bulk update --- src/ce_libmaneditor.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ce_libmaneditor.pas b/src/ce_libmaneditor.pas index e6c4c00c..eed31dd9 100644 --- a/src/ce_libmaneditor.pas +++ b/src/ce_libmaneditor.pas @@ -314,11 +314,12 @@ procedure TCELibManEditorWidget.dataToGrid; var itm: TLibraryItem; row: TListItem; - i: NativeInt; + i: Integer; begin - List.Clear; if LibMan = nil then exit; + List.BeginUpdate; + List.Clear; for i := 0 to LibMan.libraries.Count - 1 do begin itm := TLibraryItem(LibMan.libraries.Items[i]); @@ -327,6 +328,7 @@ begin row.SubItems.Add(itm.libFile); row.SubItems.Add(itm.libSourcePath); end; + List.EndUpdate; end; procedure TCELibManEditorWidget.gridToData; @@ -336,6 +338,7 @@ var begin if LibMan = nil then exit; + LibMan.libraries.BeginUpdate; LibMan.libraries.Clear; for row in List.Items do begin @@ -344,6 +347,7 @@ begin itm.libFile := row.SubItems.Strings[0]; itm.libSourcePath := row.SubItems.Strings[1]; end; + LibMan.libraries.EndUpdate; LibMan.updateDCD; end;