This commit is contained in:
Michaël Van Canneyt 2023-10-13 17:19:36 +02:00
parent d5807e03b6
commit 08821f9422

View File

@ -1555,11 +1555,12 @@ begin
ResultName := CompName;
Lock;
try
while Assigned(FindGlobalComponent(ResultName)) do
begin
Inc(i);
ResultName := CompName + '_' + IntToStr(i);
end;
if ResultName<>'' then
while Assigned(FindGlobalComponent(ResultName)) do
begin
Inc(i);
ResultName := CompName + '_' + IntToStr(i);
end;
Result.Name := ResultName;
finally
Unlock;