Browse Source

Hold fp data constant

We cache arc data to ensure that we know if it has changed since
loading, however footprints perform transformation (displacement +
rotation) on their internal elements, so we need to provide the same
transformation to the cache in order to assure it matches when writing
to disk, otherwise, the arc midpoint will be recalculated leading to
instability

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19648
pcb_db
Seth Hillbrand 9 months ago
parent
commit
6d40bf049e
  1. 8
      common/eda_shape.cpp

8
common/eda_shape.cpp

@ -539,6 +539,10 @@ void EDA_SHAPE::move( const VECTOR2I& aMoveVector )
{
case SHAPE_T::ARC:
m_arcCenter += aMoveVector;
m_arcMidData.center += aMoveVector;
m_arcMidData.start += aMoveVector;
m_arcMidData.end += aMoveVector;
m_arcMidData.mid += aMoveVector;
KI_FALLTHROUGH;
case SHAPE_T::SEGMENT:
@ -642,6 +646,10 @@ void EDA_SHAPE::rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle )
RotatePoint( m_start, aRotCentre, aAngle );
RotatePoint( m_end, aRotCentre, aAngle );
RotatePoint( m_arcCenter, aRotCentre, aAngle );
RotatePoint( m_arcMidData.start, aRotCentre, aAngle );
RotatePoint( m_arcMidData.end, aRotCentre, aAngle );
RotatePoint( m_arcMidData.mid, aRotCentre, aAngle );
RotatePoint( m_arcMidData.center, aRotCentre, aAngle );
break;
case SHAPE_T::RECTANGLE:

Loading…
Cancel
Save