Make sure text gets rotated, not just position.

Fixes https://gitlab.com/kicad/code/kicad/issues/7964
This commit is contained in:
Jeff Young 2021-06-13 20:02:32 +01:00
parent da833ad7dd
commit d9cb5a3015
1 changed files with 11 additions and 1 deletions

View File

@ -584,7 +584,17 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
}
else
{
item->Rotate( rotPoint );
SCH_FIELD* field = static_cast<SCH_FIELD*>( 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<SCH_ITEM*>( field->GetParent() )->ClearFieldsAutoplaced();
}
}
else