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:
parent
b7128639f8
commit
4d8949371f
|
@ -56,11 +56,11 @@ const VECTOR2I CN_ITEM::GetAnchor( int n ) const
|
||||||
{
|
{
|
||||||
D_PAD* pad = (D_PAD*) m_parent;
|
D_PAD* pad = (D_PAD*) m_parent;
|
||||||
|
|
||||||
pt0 = pad->ShapePos();
|
|
||||||
|
|
||||||
if( n == 0 )
|
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;
|
VECTOR2I pt1 = pt0;
|
||||||
|
|
||||||
switch( n )
|
switch( n )
|
||||||
|
|
Loading…
Reference in New Issue