Apply relevant fixes from 51479c2042
.
Fixes: lp:1834703 * https://bugs.launchpad.net/kicad/+bug/1834703
This commit is contained in:
parent
3974c6fd89
commit
10fd8a59b2
|
@ -39,7 +39,7 @@
|
||||||
#include <general.h>
|
#include <general.h>
|
||||||
#include <lib_polyline.h>
|
#include <lib_polyline.h>
|
||||||
#include <transform.h>
|
#include <transform.h>
|
||||||
|
#include <geometry/shape_line_chain.h>
|
||||||
|
|
||||||
LIB_POLYLINE::LIB_POLYLINE( LIB_PART* aParent ) :
|
LIB_POLYLINE::LIB_POLYLINE( LIB_PART* aParent ) :
|
||||||
LIB_ITEM( LIB_POLYLINE_T, aParent )
|
LIB_ITEM( LIB_POLYLINE_T, aParent )
|
||||||
|
@ -278,6 +278,18 @@ bool LIB_POLYLINE::HitTest( const wxPoint &aPosition, int aThreshold, const TRAN
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( m_Fill != NO_FILL && GetCornerCount() > 2 )
|
||||||
|
{
|
||||||
|
SHAPE_LINE_CHAIN shape;
|
||||||
|
|
||||||
|
for( wxPoint pt : m_PolyPoints )
|
||||||
|
shape.Append( aTransform.TransformCoordinate( pt ) );
|
||||||
|
|
||||||
|
shape.SetClosed( true );
|
||||||
|
|
||||||
|
return shape.PointInside( aPosition );
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue