mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 11:29:31 +02:00
only do a case insensitive name check, if the component is initialized (issue #1957)
git-svn-id: trunk@9060 -
This commit is contained in:
parent
4b0d47d1c7
commit
6e2aedbb9a
@ -1978,6 +1978,11 @@ var
|
||||
i: Integer;
|
||||
CurComponent: TComponent;
|
||||
begin
|
||||
// check if component is initialized
|
||||
if (CurName='') or (NewName='')
|
||||
or ((AComponent<>nil) and (csDestroying in AComponent.ComponentState)) then
|
||||
exit;
|
||||
|
||||
// check, if there is already such a component
|
||||
for i:=0 to FLookupRoot.ComponentCount-1 do begin
|
||||
CurComponent:=FLookupRoot.Components[i];
|
||||
@ -1988,10 +1993,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// check if component is initialized
|
||||
if (CurName='') or (NewName='')
|
||||
or ((AComponent<>nil) and (csDestroying in AComponent.ComponentState)) then
|
||||
exit;
|
||||
// check if component is the LookupRoot
|
||||
if AComponent=nil then AComponent:=FLookupRoot;
|
||||
// consistency check
|
||||
|
Loading…
Reference in New Issue
Block a user