mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 21:19:18 +02:00
IDE: Use BeginUpdate-EndUpdate blocks in component palette options.
git-svn-id: trunk@47116 -
This commit is contained in:
parent
483871416f
commit
5ae6d7c5ac
@ -247,6 +247,7 @@ var
|
|||||||
Pg: TBaseComponentPage;
|
Pg: TBaseComponentPage;
|
||||||
begin
|
begin
|
||||||
// First clear existing items and add <All> page.
|
// First clear existing items and add <All> page.
|
||||||
|
PagesListBox.Items.BeginUpdate;
|
||||||
for i := 0 to PagesListBox.Items.Count-1 do
|
for i := 0 to PagesListBox.Items.Count-1 do
|
||||||
PagesListBox.Items.Objects[i].Free;
|
PagesListBox.Items.Objects[i].Free;
|
||||||
PagesListBox.Clear;
|
PagesListBox.Clear;
|
||||||
@ -265,6 +266,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
PagesListBox.ItemIndex := 0; // Activate first item
|
PagesListBox.ItemIndex := 0; // Activate first item
|
||||||
|
PagesListBox.Items.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompPaletteOptionsFrame.InitialComps(aPageInd: Integer; aCompList: TStringList);
|
procedure TCompPaletteOptionsFrame.InitialComps(aPageInd: Integer; aCompList: TStringList);
|
||||||
@ -302,6 +304,7 @@ begin
|
|||||||
StartInd := PagesListBox.Items.IndexOf(aPageName);
|
StartInd := PagesListBox.Items.IndexOf(aPageName);
|
||||||
EndInd := StartInd;
|
EndInd := StartInd;
|
||||||
end;
|
end;
|
||||||
|
ComponentsListView.Items.BeginUpdate;
|
||||||
ComponentsListView.Items.Clear;
|
ComponentsListView.Items.Clear;
|
||||||
for PageCnt := StartInd to EndInd do
|
for PageCnt := StartInd to EndInd do
|
||||||
begin
|
begin
|
||||||
@ -318,6 +321,7 @@ begin
|
|||||||
Item.Data := Comp;
|
Item.Data := Comp;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
ComponentsListView.Items.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompPaletteOptionsFrame.PagesListBoxSelectionChange(Sender: TObject; User: boolean);
|
procedure TCompPaletteOptionsFrame.PagesListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||||
|
Loading…
Reference in New Issue
Block a user