sch groups: fix walking text when rotating a single group

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20712
This commit is contained in:
Mike Williams 2025-05-05 10:54:18 -04:00
parent 2e8367a40a
commit 94b7d48f62

View File

@ -891,7 +891,6 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
case SCH_NO_CONNECT_T:
case SCH_BUS_BUS_ENTRY_T:
case SCH_BUS_WIRE_ENTRY_T:
case SCH_GROUP_T:
head->Rotate( rotPoint, !clockwise );
break;
@ -918,6 +917,19 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
break;
case SCH_GROUP_T:
{
// Rotate the group on itself. Groups do not have an anchor point.
SCH_GROUP* group = static_cast<SCH_GROUP*>( head );
rotPoint = m_frame->GetNearestHalfGridPosition( group->GetPosition() );
group->Rotate( rotPoint, !clockwise );
group->Move( rotPoint - m_frame->GetNearestHalfGridPosition( group->GetPosition() ) );
break;
}
case SCH_TABLE_T:
{
// Rotate the table on itself. Tables do not have an anchor point.