Designer: Rename component: fix limitation when renaming the form itself

git-svn-id: trunk@62775 -
This commit is contained in:
ondrej 2020-03-19 08:18:38 +00:00
parent 5a0a107a61
commit c0484a52e0

View File

@ -286,6 +286,8 @@ begin
ErrorMsg:=lisThereIsAlreadyAComponentWithThisName;
exit;
end;
if FLookupRoot<>FNewComponent then
begin
if SysUtils.CompareText(AName,FLookupRoot.Name)=0 then begin
ErrorMsg:=lisTheOwnerHasThisName;
exit;
@ -294,6 +296,7 @@ begin
ErrorMsg:=lisTheOwnerClassHasThisName;
exit;
end;
end;
if SysUtils.CompareText(AName,GetClassUnitName(FLookupRoot.ClassType))=0 then begin
ErrorMsg:=lisTheUnitHasThisName;
exit;