diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 7058fdceb6..bf1283d0e7 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -975,6 +975,19 @@ void SCH_GLOBALLABEL::SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle ) } +void SCH_GLOBALLABEL::Rotate( wxPoint aPosition ) +{ + wxPoint pt = GetTextPos(); + RotatePoint( &pt, aPosition, 900 ); + wxPoint offset = pt - GetTextPos(); + + Rotate90( false ); + + SetTextPos( GetTextPos() + offset ); + m_intersheetRefsField.SetTextPos( m_intersheetRefsField.GetTextPos() + offset ); +} + + void SCH_GLOBALLABEL::Rotate90( bool aClockwise ) { SCH_TEXT::Rotate90( aClockwise ); diff --git a/eeschema/sch_text.h b/eeschema/sch_text.h index ad72862e0a..84a47c414c 100644 --- a/eeschema/sch_text.h +++ b/eeschema/sch_text.h @@ -402,6 +402,7 @@ public: void RunOnChildren( const std::function& aFunction ) override; + void Rotate( wxPoint aPosition ) override; void Rotate90( bool aClockwise ) override; void MirrorSpinStyle( bool aLeftRight ) override;