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:
Seth Hillbrand 2021-10-07 11:09:14 -07:00
parent 57c7d663b0
commit 51d3440c38
1 changed files with 10 additions and 0 deletions

View File

@ -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();