瀏覽代碼

+ Fixed bug in ValidateRename

michael 26 年之前
父節點
當前提交
6580c05b5c
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      fcl/inc/compon.inc

+ 5 - 2
fcl/inc/compon.inc

@@ -312,7 +312,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
+  If (AComponent<>Nil) and (CurName<>NewName) 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
@@ -478,7 +478,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.6  1999-04-08 10:18:51  peter
+  Revision 1.7  1999-04-12 08:02:48  michael
+  + Fixed bug in ValidateRename
+
+  Revision 1.6  1999/04/08 10:18:51  peter
     * makefile updates
     * makefile updates
 
 
 }
 }