Honour component transforms when rotating fields.

Fixes https://gitlab.com/kicad/code/kicad/issues/7964
This commit is contained in:
Jeff Young 2021-03-19 19:33:06 +00:00
parent e560de496c
commit 30ac8de734
3 changed files with 7 additions and 7 deletions

View File

@ -435,11 +435,11 @@ bool SCH_FIELD::Replace( const wxFindReplaceData& aSearchData, void* aAuxData )
}
void SCH_FIELD::Rotate( wxPoint aPosition )
void SCH_FIELD::Rotate( wxPoint aCenter )
{
wxPoint pt = GetTextPos();
RotatePoint( &pt, aPosition, 900 );
SetTextPos( pt );
wxPoint pt = GetPosition();
RotatePoint( &pt, aCenter, 900 );
SetPosition( pt );
}

View File

@ -157,7 +157,7 @@ public:
Offset( aMoveVector );
}
void Rotate( wxPoint aPosition ) override;
void Rotate( wxPoint aCenter ) override;
/**
* @copydoc SCH_ITEM::MirrorVertically()

View File

@ -328,9 +328,9 @@ public:
virtual void MirrorVertically( int aCenter ) = 0;
/**
* Rotate the item around \a aPosition 90 degrees in the clockwise direction.
* Rotate the item around \a aCenter 90 degrees in the clockwise direction.
*/
virtual void Rotate( wxPoint aPosition ) = 0;
virtual void Rotate( wxPoint aCenter ) = 0;
/**
* Add the schematic item end points to \a aItemList if the item has end points.