IDE: Use BeginUpdate-EndUpdate blocks in component palette options.

git-svn-id: trunk@47116 -
This commit is contained in:
juha 2014-12-05 11:43:39 +00:00
parent 483871416f
commit 5ae6d7c5ac

View File

@ -247,6 +247,7 @@ var
Pg: TBaseComponentPage;
begin
// First clear existing items and add <All> page.
PagesListBox.Items.BeginUpdate;
for i := 0 to PagesListBox.Items.Count-1 do
PagesListBox.Items.Objects[i].Free;
PagesListBox.Clear;
@ -265,6 +266,7 @@ begin
end;
end;
PagesListBox.ItemIndex := 0; // Activate first item
PagesListBox.Items.EndUpdate;
end;
procedure TCompPaletteOptionsFrame.InitialComps(aPageInd: Integer; aCompList: TStringList);
@ -302,6 +304,7 @@ begin
StartInd := PagesListBox.Items.IndexOf(aPageName);
EndInd := StartInd;
end;
ComponentsListView.Items.BeginUpdate;
ComponentsListView.Items.Clear;
for PageCnt := StartInd to EndInd do
begin
@ -318,6 +321,7 @@ begin
Item.Data := Comp;
end;
end;
ComponentsListView.Items.EndUpdate;
end;
procedure TCompPaletteOptionsFrame.PagesListBoxSelectionChange(Sender: TObject; User: boolean);