Use footprint type to inform new pad type
Makes usage cleaner. If the user specifies that they are creating an SMD, they should get SMD pads by default so that they don't have to change them later. Fixes https://gitlab.com/kicad/code/kicad/issues/9333
This commit is contained in:
parent
57c7d663b0
commit
51d3440c38
|
@ -483,6 +483,16 @@ int PAD_TOOL::PlacePad( const TOOL_EVENT& aEvent )
|
|||
|
||||
pad->ImportSettingsFrom( *(m_frame->GetDesignSettings().m_Pad_Master.get()) );
|
||||
|
||||
// If the user has set the footprint type to SMD, we assume that they would like to place
|
||||
// SMD pads
|
||||
if( m_board->GetFirstFootprint()->GetAttributes() & FP_SMD )
|
||||
{
|
||||
pad->SetAttribute( PAD_ATTRIB::SMD );
|
||||
pad->SetShape( PAD_SHAPE::ROUNDRECT );
|
||||
pad->SetSizeX( 1.5 * pad->GetSizeY() );
|
||||
pad->SetLayerSet( PAD::SMDMask() );
|
||||
}
|
||||
|
||||
if( pad->CanHaveNumber() )
|
||||
{
|
||||
wxString padNumber = m_padTool->GetLastPadNumber();
|
||||
|
|
Loading…
Reference in New Issue