Cleanup.
This commit is contained in:
@@ -789,8 +789,6 @@ void FOOTPRINT::Remove( BOARD_ITEM* aBoardItem, REMOVE_MODE aMode )
|
||||
{
|
||||
case PCB_FIELD_T:
|
||||
{
|
||||
PCB_FIELD* field = static_cast<PCB_FIELD*>( aBoardItem );
|
||||
|
||||
for( auto it = m_fields.begin(); it != m_fields.end(); ++it )
|
||||
{
|
||||
if( *it == aBoardItem )
|
||||
|
||||
@@ -2354,22 +2354,9 @@ void PCB_EDIT_FRAME::ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew,
|
||||
if( reset3DModels )
|
||||
{
|
||||
// We've replaced the existing footprint with the library one, so the 3D models are
|
||||
// already reset. Just set the aUpdated flag if appropriate.
|
||||
if( aNew->Models().size() != aExisting->Models().size() )
|
||||
{
|
||||
*aUpdated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
for( size_t ii = 0; ii < aNew->Models().size(); ++ii )
|
||||
{
|
||||
if( aNew->Models()[ii] != aExisting->Models()[ii] )
|
||||
{
|
||||
*aUpdated = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// already reset.
|
||||
//
|
||||
// We only have to do anything if reset3DModels is *not* set....
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -432,15 +432,13 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
|
||||
{
|
||||
case UNDO_REDO::CHANGED: /* Exchange old and new data for each item */
|
||||
{
|
||||
BOARD_ITEM* item = (BOARD_ITEM*) eda_item;
|
||||
BOARD_ITEM_CONTAINER* parent = GetBoard();
|
||||
BOARD_ITEM* item = (BOARD_ITEM*) eda_item;
|
||||
|
||||
if( item->GetParentFootprint() )
|
||||
{
|
||||
// We need the current item and it's parent, which may be different from what
|
||||
// was stored if we're multiple frames up the undo stack.
|
||||
// We need the current item, which may be different from what was stored if
|
||||
// we're multiple frames up the undo stack.
|
||||
item = GetBoard()->GetItem( item->m_Uuid );
|
||||
parent = item->GetParentFootprint();
|
||||
}
|
||||
|
||||
BOARD_ITEM* image = (BOARD_ITEM*) aList->GetPickedItemLink( ii );
|
||||
|
||||
Reference in New Issue
Block a user