Selaa lähdekoodia

+ Fixed bug in ValidateRename

michael 27 vuotta sitten
vanhempi
sitoutus
6580c05b5c
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  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
 
 
 }
 }