From 0631c8fc74c898a05b5f9e8673f117b53af41faa Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 9 Nov 2021 13:09:06 +0000 Subject: [PATCH] Fix logic bug when updating circular pad points. Fixes https://gitlab.com/kicad/code/kicad/issues/9576 --- pcbnew/tools/pcb_point_editor.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pcbnew/tools/pcb_point_editor.cpp b/pcbnew/tools/pcb_point_editor.cpp index 2af2d0444c..6c4ee822be 100644 --- a/pcbnew/tools/pcb_point_editor.cpp +++ b/pcbnew/tools/pcb_point_editor.cpp @@ -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 ); }