project groups, upstream fix, selected item not highlighted after list update

This commit is contained in:
Basile Burg 2016-09-09 00:55:24 +02:00
parent f2f7661462
commit 19eed6ea36
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 9 additions and 0 deletions

View File

@ -674,6 +674,7 @@ var
const
typeStr: array[TCEProjectFormat] of string = ('CE','DUB');
begin
lstProj.BeginUpdate;
lstProj.Items.Clear;
for i := 0 to projectGroup.projectCount-1 do
begin
@ -693,6 +694,14 @@ begin
SubItems.Add(prj.fProj.configurationName(prj.fProj.getActiveConfigurationIndex));
end;
end;
if projectGroup.projectCount > 0 then
begin
i := projectGroup.getProjectIndex;
if i > projectGroup.projectCount then
i := projectGroup.projectCount-1;
lstProj.ItemIndex:= i;
end;
lstProj.EndUpdate;
if fFreeProj <> nil then
begin
if fFreeProj.filename.fileExists then