Offset 3D models when moving footprint origin.

Fixes https://gitlab.com/kicad/code/kicad/issues/7868
This commit is contained in:
Jeff Young 2021-03-12 17:37:09 +00:00
parent faf9cca938
commit 93db7a130a
2 changed files with 8 additions and 1 deletions

View File

@ -1539,6 +1539,13 @@ void FOOTPRINT::MoveAnchorPosition( const wxPoint& aMoveVector )
zone->Move( moveVector );
}
// Update the 3D models
for( FP_3DMODEL& model : Models() )
{
model.m_Offset.x += Iu2Millimeter( moveVector.x );
model.m_Offset.y -= Iu2Millimeter( moveVector.y );
}
m_cachedBoundingBox.Move( moveVector );
m_cachedVisibleBBox.Move( moveVector );
m_cachedTextExcludedBBox.Move( moveVector );