mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 11:39:32 +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;
|
i: Integer;
|
||||||
CurComponent: TComponent;
|
CurComponent: TComponent;
|
||||||
begin
|
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
|
// check, if there is already such a component
|
||||||
for i:=0 to FLookupRoot.ComponentCount-1 do begin
|
for i:=0 to FLookupRoot.ComponentCount-1 do begin
|
||||||
CurComponent:=FLookupRoot.Components[i];
|
CurComponent:=FLookupRoot.Components[i];
|
||||||
@ -1988,10 +1993,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
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
|
// check if component is the LookupRoot
|
||||||
if AComponent=nil then AComponent:=FLookupRoot;
|
if AComponent=nil then AComponent:=FLookupRoot;
|
||||||
// consistency check
|
// consistency check
|
||||||
|
Loading…
Reference in New Issue
Block a user