Do not include arc centre in bounding box
Arc centres don't land in the bounding box when the arc angle is small. Currently, there are added to the BB, which leads to surprising selection beheviour of arc segments (the BB can be much larger than expected). This commit omits the arc centre from the calculation. Fixes: lp:1492734 * https://bugs.launchpad.net/kicad/+bug/1492734
This commit is contained in:
parent
1cb171acf0
commit
2710221f5f
|
@ -608,9 +608,10 @@ const BOX2I DRAWSEGMENT::ViewBBox() const
|
|||
|
||||
void DRAWSEGMENT::computeArcBBox( EDA_RECT& aBBox ) const
|
||||
{
|
||||
aBBox.Merge( m_End );
|
||||
// TODO perhaps the above line can be replaced with this one, so we do not include the center
|
||||
//aBBox.SetOrigin( m_End );
|
||||
// Do not include the center, which is not necessarily
|
||||
// inside the BB of a arc with a small angle
|
||||
aBBox.SetOrigin( m_End );
|
||||
|
||||
wxPoint end = m_End;
|
||||
RotatePoint( &end, m_Start, -m_Angle );
|
||||
aBBox.Merge( end );
|
||||
|
|
Loading…
Reference in New Issue