Comment 6 for bug 1271161

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote : Re: [Bug 1271161] Re: No footprint libraries in CvPCB

On 01/21/2014 09:05 AM, Dick Hollenbeck wrote:
> On 01/21/2014 08:54 AM, marus25 wrote:
>> I hadn't noticed that; but yes, it only happens if the project-specific
>> fp-lib-table is empty or non-existent. But under normal circumstances
>> that will be non-existent with a new project, and I would think for may,
>> probably most, projects for their entire lifespan (I know I've certainly
>> done projects without having footprints specific to the project; and
>> even if I have to create a footprint for a project I tend to put it in a
>> global library as if I start using a part it is likely I will use it
>> again in other projects in the future).
>>
>
> Its a bug. Easy to fix.
>
> The tables are stacked, project specific on top of the global. The test being done only
> tests the count in the project specific table.
>
> One wonders why any tests must be done. Assuming there are two tables is probably a bad
> choice two, because when you add that third one you have a problem. Also, the GetCount()
> function should not return the sum of both tables.
>
> However maybe a new function is needed that does the summing of fall back table entry
> counts. Something like:
>
> int FP_LIB_TABLE::GetTotalCount()
> {
> // sum my count plus all fall back tables.
> }
>
>

To be technically accurate the aggregate table "size" may be less than the sum of all ROWs
in both tables, because of precedence masking.

The count of entries returned by

   FP_LIB_TABLE::GetLogicalLibs()

is the accurate count.

Patch attached.