pcbnew: fixes in custom pad creation tool

Fixes: lp:1753152
* https://bugs.launchpad.net/kicad/+bug/1753152
This commit is contained in:
Tomasz Włostowski 2018-03-05 17:51:43 +01:00
parent aff350f593
commit 48459e4268
1 changed files with 8 additions and 0 deletions

View File

@ -387,6 +387,13 @@ int MODULE_EDITOR_TOOLS::CreatePadFromShapes( const TOOL_EVENT& aEvent )
if( refPad )
{
pad.reset( static_cast<D_PAD*>( refPad->Clone() ) );
if( refPad->GetShape() == PAD_SHAPE_RECT )
pad->SetAnchorPadShape( PAD_SHAPE_RECT );
// ignore the pad orientation and offset for the moment. Makes more trouble than it's worth.
pad->SetOrientation( 0 );
pad->SetOffset( wxPoint( 0, 0 ) );
}
else
{
@ -397,6 +404,7 @@ int MODULE_EDITOR_TOOLS::CreatePadFromShapes( const TOOL_EVENT& aEvent )
int radius = Millimeter2iu( 0.2 );
pad->SetSize ( wxSize( radius, radius ) );
pad->IncrementPadName( true, true );
pad->SetOrientation( 0 );
}