From d9cb5a30150195e28e70620a9b15b3a0ece6ce59 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 13 Jun 2021 20:02:32 +0100 Subject: [PATCH] Make sure text gets rotated, not just position. Fixes https://gitlab.com/kicad/code/kicad/issues/7964 --- eeschema/tools/sch_edit_tool.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index dc148daecf..1ce48ba310 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -584,7 +584,17 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent ) } else { - item->Rotate( rotPoint ); + SCH_FIELD* field = static_cast( item ); + + field->Rotate( rotPoint ); + + if( field->GetTextAngle() == TEXT_ANGLE_HORIZ ) + field->SetTextAngle( TEXT_ANGLE_VERT ); + else + field->SetTextAngle( TEXT_ANGLE_HORIZ ); + + // Now that we're moving a field, they're no longer autoplaced. + static_cast( field->GetParent() )->ClearFieldsAutoplaced(); } } else