diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index a4fb0105ab..f529a54a5d 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -1791,10 +1791,11 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent ) if( selection.Empty() ) return 0; - if( selection.Size() == 1 ) + // A single textbox "walks" if we rotate it around its position, as we keep resetting which + // corner is the origin. + if( selection.Size() == 1 && dynamic_cast( selection.Front() ) ) { - if( BOARD_ITEM* item = dynamic_cast( selection.Front() ) ) - selection.SetReferencePoint( item->GetCenter() ); + selection.SetReferencePoint( static_cast( selection.Front() )->GetCenter() ); } else {