浏览代码

+ Made validaterename case-insensitive (after bug #5166)

git-svn-id: trunk@3550 -
michael 19 年之前
父节点
当前提交
4d01d98667
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rtl/objpas/classes/compon.inc

+ 1 - 1
rtl/objpas/classes/compon.inc

@@ -340,7 +340,7 @@ Procedure TComponent.ValidateRename(AComponent: TComponent;
 
 
 begin
 begin
 //!! This contradicts the Delphi manual.
 //!! This contradicts the Delphi manual.
-  If (AComponent<>Nil) and (CurName<>NewName) and (AComponent.Owner = Self) and
+  If (AComponent<>Nil) and (CompareText(CurName,NewName)<>0) and (AComponent.Owner = Self) and
      (FindComponent(NewName)<>Nil) then
      (FindComponent(NewName)<>Nil) then
       raise EComponentError.Createfmt(SDuplicateName,[newname]);
       raise EComponentError.Createfmt(SDuplicateName,[newname]);
   If (csDesigning in FComponentState) and (FOwner<>Nil) then
   If (csDesigning in FComponentState) and (FOwner<>Nil) then