mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 11:40:36 +02:00
* Remove component from previous owner. Fix issue #39529
This commit is contained in:
parent
42361be239
commit
d6a26f2c28
@ -603,6 +603,8 @@ Procedure TComponent.InsertComponent(AComponent: TComponent);
|
||||
begin
|
||||
AComponent.ValidateContainer(Self);
|
||||
ValidateRename(AComponent,'',AComponent.FName);
|
||||
If AComponent.FOwner<>Nil then
|
||||
AComponent.FOwner.Remove(AComponent);
|
||||
Insert(AComponent);
|
||||
AComponent.SetReference(True);
|
||||
If csDesigning in FComponentState then
|
||||
|
Loading…
Reference in New Issue
Block a user