pcbnew: Drop tracks not on copper
We do not allow non-copper routed tracks and they will break assumptions elsewhere in the code. We drop them in the beginning so that they are not saved.
This commit is contained in:
parent
574473c480
commit
cabfcbc73c
|
@ -890,6 +890,14 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode )
|
||||||
|
|
||||||
case PCB_TRACE_T:
|
case PCB_TRACE_T:
|
||||||
case PCB_VIA_T:
|
case PCB_VIA_T:
|
||||||
|
|
||||||
|
// N.B. This inserts a small memory leak as we lose the
|
||||||
|
if( !IsCopperLayer( aBoardItem->GetLayer() ) )
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( wxT( "BOARD::Add() Cannot place Track on non-copper layer" ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( aMode == ADD_APPEND )
|
if( aMode == ADD_APPEND )
|
||||||
{
|
{
|
||||||
m_Track.PushBack( (TRACK*) aBoardItem );
|
m_Track.PushBack( (TRACK*) aBoardItem );
|
||||||
|
|
Loading…
Reference in New Issue