BOARD_NETLIST_UPDATER: fix incorrect handling of new fields added to a Fp
- the new field position/rotation is now the same as its footprint parent. - it is added to the view.
This commit is contained in:
parent
24452f41ad
commit
878a67ca65
|
@ -373,6 +373,17 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint,
|
||||||
newField->SetVisible( false );
|
newField->SetVisible( false );
|
||||||
newField->SetLayer( aPcbFootprint->GetLayer() == F_Cu ? F_Fab : B_Fab );
|
newField->SetLayer( aPcbFootprint->GetLayer() == F_Cu ? F_Fab : B_Fab );
|
||||||
newField->StyleFromSettings( m_frame->GetDesignSettings() );
|
newField->StyleFromSettings( m_frame->GetDesignSettings() );
|
||||||
|
|
||||||
|
// Give the relative position (0,0) in footprint
|
||||||
|
newField->SetPosition( aPcbFootprint->GetPosition() );
|
||||||
|
// Give the footprint orientation
|
||||||
|
newField->Rotate( aPcbFootprint->GetPosition(), aPcbFootprint->GetOrientation() );
|
||||||
|
|
||||||
|
if( m_frame )
|
||||||
|
{
|
||||||
|
auto view = m_frame->GetCanvas()->GetView();
|
||||||
|
view->Add( newField );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue