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(); + + 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 ); }