From e6a5669d02515615daec165fdd11102790a6799c Mon Sep 17 00:00:00 2001 From: Jeff Young <jeff@rokeby.ie> Date: Sun, 18 Aug 2024 13:01:24 -0600 Subject: [PATCH] Use ORIGIN_TRANSFORMS in Mover Corner To... dialog. Fixes https://gitlab.com/kicad/code/kicad/-/issues/18479 --- pcbnew/tools/pcb_point_editor.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/pcb_point_editor.cpp b/pcbnew/tools/pcb_point_editor.cpp index b16b5ae82c..f431b6aa1f 100644 --- a/pcbnew/tools/pcb_point_editor.cpp +++ b/pcbnew/tools/pcb_point_editor.cpp @@ -761,9 +761,12 @@ int PCB_POINT_EDITOR::movePoint( const TOOL_EVENT& aEvent ) if( !m_editPoints || !m_editPoints->GetParent() || !HasPoint() ) return 0; - BOARD_COMMIT commit( frame() ); + PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>(); + + BOARD_COMMIT commit( editFrame ); commit.Stage( m_editPoints->GetParent(), CHT_MODIFY ); + VECTOR2I pt = editFrame->GetOriginTransforms().ToDisplayAbs( m_editedPoint->GetPosition() ); wxString title; wxString msg; @@ -778,11 +781,12 @@ int PCB_POINT_EDITOR::movePoint( const TOOL_EVENT& aEvent ) msg = _( "Move Corner" ); } - WX_PT_ENTRY_DIALOG dlg( frame(), title, _( "X:" ), _( "Y:" ), m_editedPoint->GetPosition() ); + WX_PT_ENTRY_DIALOG dlg( editFrame, title, _( "X:" ), _( "Y:" ), pt ); if( dlg.ShowModal() == wxID_OK ) { - m_editedPoint->SetPosition( dlg.GetValue() ); + pt = editFrame->GetOriginTransforms().FromDisplayAbs( dlg.GetValue() ); + m_editedPoint->SetPosition( pt ); updateItem( &commit ); commit.Push( msg ); }