Pcbnew: fix ADD_APPEND option in BOARD::Add() so using version control for board files is practical.

This commit is contained in:
Henner Zeller 2015-06-18 15:23:01 -04:00 committed by Wayne Stambaugh
parent a543b5063f
commit e211a77d8b
1 changed files with 11 additions and 3 deletions

View File

@ -685,9 +685,17 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, int aControl )
case PCB_TRACE_T:
case PCB_VIA_T:
TRACK* insertAid;
insertAid = ( (TRACK*) aBoardItem )->GetBestInsertPoint( this );
m_Track.Insert( (TRACK*) aBoardItem, insertAid );
if( aControl & ADD_APPEND )
{
m_Track.PushBack( (TRACK*) aBoardItem );
}
else
{
TRACK* insertAid;
insertAid = ( (TRACK*) aBoardItem )->GetBestInsertPoint( this );
m_Track.Insert( (TRACK*) aBoardItem, insertAid );
}
aBoardItem->SetParent( this );
break;