IDE: ToolBarConfig tweaking.

git-svn-id: trunk@56095 -
This commit is contained in:
juha 2017-10-17 12:55:01 +00:00
parent 3accee3e98
commit f483ea123d

View File

@ -398,14 +398,17 @@ var
Node: TTreeNode; Node: TTreeNode;
SortedCtgList: TStringList; SortedCtgList: TStringList;
begin begin
SortedCtgList := TStringList.Create;
SortedCtgList.OwnsObjects := False;
for i := 0 to IDEToolButtonCategories.Count-1 do
SortedCtgList.AddObject(IDEToolButtonCategories[i].Description, IDEToolButtonCategories[i]);
SortCategories(SortedCtgList);
TV.Items.BeginUpdate; TV.Items.BeginUpdate;
SortedCtgList := TStringList.Create;
try try
SortedCtgList.OwnsObjects := False;
for i := 0 to IDEToolButtonCategories.Count-1 do
begin
xCategory := IDEToolButtonCategories[i];
SortedCtgList.AddObject(xCategory.Description, xCategory);
end;
SortCategories(SortedCtgList);
TV.Items.Clear; TV.Items.Clear;
for i := 0 to SortedCtgList.Count-1 do for i := 0 to SortedCtgList.Count-1 do
begin begin
@ -417,8 +420,8 @@ begin
AddMenuItem(Node, xCategory.Buttons[l]); AddMenuItem(Node, xCategory.Buttons[l]);
end; end;
finally finally
TV.Items.EndUpdate;
SortedCtgList.Free; SortedCtgList.Free;
TV.Items.EndUpdate;
end; end;
end; end;