If items exist on the "Rescue" layer, prompt user

Don't allow Rescue items to enter the board design.  This prompts the
user to either delete them or move them to the Comments layer.
This commit is contained in:
Seth Hillbrand 2021-02-23 09:23:58 -08:00
parent a9ea617069
commit 154d56b4f4
1 changed files with 13 additions and 0 deletions

View File

@ -734,6 +734,15 @@ BOARD* PCB_PARSER::parseBOARD_unchecked()
for( BOARD_ITEM* drawing : m_board->Drawings() )
visitItem( drawing );
for( FOOTPRINT* fp : m_board->Footprints() )
{
for( BOARD_ITEM* drawing : fp->GraphicalItems() )
visitItem( drawing );
for( BOARD_ITEM* zone : fp->Zones() )
visitItem( zone );
}
for( BOARD_ITEM* curr_item : deleteList )
m_board->Delete( curr_item );
@ -1523,6 +1532,10 @@ T PCB_PARSER::lookUpLayer( const M& aMap )
return Rescue;
}
// Some files may have saved items to the Rescue Layer due to an issue in v5
if( it->second == Rescue )
m_undefinedLayers.insert( curText );
return it->second;
}