conn: Connect pads to anchor points not geo center

Pads may include offsets that allow the user to shift the connection
point of the pad.  This is captured by the pad m_Pos but not by
ShapePos().  When testing connectivity, we need to get the offset
position.
This commit is contained in:
Seth Hillbrand 2019-09-19 13:49:12 -07:00
parent b7128639f8
commit 4d8949371f
1 changed files with 3 additions and 3 deletions

View File

@ -56,11 +56,11 @@ const VECTOR2I CN_ITEM::GetAnchor( int n ) const
{
D_PAD* pad = (D_PAD*) m_parent;
pt0 = pad->ShapePos();
if( n == 0 )
return pt0;
return VECTOR2I( pad->GetPosition() );
// ShapePos() is the geometric center (not anchor) for the pad
pt0 = pad->ShapePos();
VECTOR2I pt1 = pt0;
switch( n )