Browse Source

Fabmaster: don't show default refdeses

All the footprints have a ref-des field by default in KiCad, but if the
silkscreen text isn't present in the imported file, we should hide it.
If we see a silkscreen refdes, _then_ show it.
pcb_db
John Beard 12 months ago
parent
commit
1d0ba992da
  1. 10
      pcbnew/pcb_io/fabmaster/import_fabmaster.cpp

10
pcbnew/pcb_io/fabmaster/import_fabmaster.cpp

@ -2345,6 +2345,11 @@ bool FABMASTER::loadFootprints( BOARD* aBoard )
fp->Value().SetLayer( F_Fab );
fp->Value().SetVisible( false );
// Set refdes invisible until we find the text for it
// (otherwise we'll plonk a default-sized ref-des on the silkscreen layer
// which wasn't there in the imported file)
fp->Reference().SetVisible( false );
for( auto& ref : refdes )
{
const GRAPHIC_TEXT *lsrc =
@ -2363,9 +2368,14 @@ bool FABMASTER::loadFootprints( BOARD* aBoard )
}
if( layer == F_SilkS || layer == B_SilkS )
{
txt = &( fp->Reference() );
txt->SetVisible( true );
}
else
{
txt = new PCB_TEXT( fp );
}
if( src->mirror )
{

Loading…
Cancel
Save