diff --git a/ide/customformeditor.pp b/ide/customformeditor.pp index f11d0d63da..492be680ba 100644 --- a/ide/customformeditor.pp +++ b/ide/customformeditor.pp @@ -1316,7 +1316,7 @@ var FreeMediator:=true; end; end; - if Mediator<>nil then + if (Mediator<>nil) and (ParentComponent=nil) then begin NewSize:=Mediator.GetDefaultSize; if NewWidth=0 then @@ -1536,9 +1536,6 @@ begin end else begin // non TControl - if CompWidth <= 0 then CompWidth := 50; - if CompHeight <= 0 then CompHeight := 50; - CompLeft := Max(Low(SmallInt), Min(High(SmallInt), CompLeft)); CompTop := Max(Low(SmallInt), Min(High(SmallInt), CompTop)); if Mediator=nil then