Apply anti-walk algorithm only to textboxes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16481
This commit is contained in:
parent
9de9f921bc
commit
20efeef5ae
|
@ -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<PCB_TEXTBOX*>( selection.Front() ) )
|
||||
{
|
||||
if( BOARD_ITEM* item = dynamic_cast<BOARD_ITEM*>( selection.Front() ) )
|
||||
selection.SetReferencePoint( item->GetCenter() );
|
||||
selection.SetReferencePoint( static_cast<PCB_TEXTBOX*>( selection.Front() )->GetCenter() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue