Browse Source

Honour component transforms when rotating fields.

Fixes https://gitlab.com/kicad/code/kicad/issues/7964
6.0.7
Jeff Young 5 years ago
parent
commit
30ac8de734
  1. 8
      eeschema/sch_field.cpp
  2. 2
      eeschema/sch_field.h
  3. 4
      eeschema/sch_item.h

8
eeschema/sch_field.cpp

@ -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 );
}

2
eeschema/sch_field.h

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

4
eeschema/sch_item.h

@ -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.

Loading…
Cancel
Save