Fix logic bug when updating circular pad points.

Fixes https://gitlab.com/kicad/code/kicad/issues/9576
This commit is contained in:
Jeff Young 2021-11-09 13:09:06 +00:00
parent 18d9f6e323
commit 0631c8fc74
1 changed files with 5 additions and 7 deletions

View File

@ -1631,10 +1631,8 @@ void PCB_POINT_EDITOR::updatePoints()
}
else if( target == 1 )
{
VECTOR2I vec = m_editPoints->Point( 0 ).GetPosition() - shapePos;
vec.Resize( halfSize.x );
m_editPoints->Point( 0 ).SetPosition( vec + shapePos );
shapePos.x += halfSize.x;
m_editPoints->Point( 0 ).SetPosition( shapePos );
}
}
break;
@ -2188,12 +2186,12 @@ int PCB_POINT_EDITOR::changeEditMethod( const TOOL_EVENT& aEvent )
void PCB_POINT_EDITOR::setTransitions()
{
Go( &PCB_POINT_EDITOR::OnSelectionChange, ACTIONS::activatePointEditor.MakeEvent() );
Go( &PCB_POINT_EDITOR::addCorner, PCB_ACTIONS::pointEditorAddCorner.MakeEvent() );
Go( &PCB_POINT_EDITOR::removeCorner, PCB_ACTIONS::pointEditorRemoveCorner.MakeEvent() );
Go( &PCB_POINT_EDITOR::addCorner, PCB_ACTIONS::pointEditorAddCorner.MakeEvent() );
Go( &PCB_POINT_EDITOR::removeCorner, PCB_ACTIONS::pointEditorRemoveCorner.MakeEvent() );
Go( &PCB_POINT_EDITOR::modifiedSelection, EVENTS::SelectedItemsModified );
Go( &PCB_POINT_EDITOR::OnSelectionChange, EVENTS::SelectedEvent );
Go( &PCB_POINT_EDITOR::OnSelectionChange, EVENTS::UnselectedEvent );
Go( &PCB_POINT_EDITOR::changeEditMethod, ACTIONS::changeEditMethod.MakeEvent() );
Go( &PCB_POINT_EDITOR::changeEditMethod, ACTIONS::changeEditMethod.MakeEvent() );
Go( &PCB_POINT_EDITOR::OnSelectionChange, EVENTS::InhibitSelectionEditing );
Go( &PCB_POINT_EDITOR::OnSelectionChange, EVENTS::UninhibitSelectionEditing );
}