diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index f097f52547..ab2bbdec2a 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -1353,9 +1353,10 @@ void DIALOG_PAD_PROPERTIES::redraw() if( maxYExtent > INT_MAX / 4 ) maxYExtent = INT_MAX / 4; - BOX2D viewBox, canvasBox; - viewBox.Inflate( maxXExtent * 1.4, maxYExtent * 1.4 ); // add a margin - canvasBox.Inflate( maxXExtent * 2.0, maxYExtent * 2.0 ); + BOX2D viewBox( m_dummyPad->GetPosition(), {0, 0} ); + BOX2D canvasBox( m_dummyPad->GetPosition(), {0, 0} ); + viewBox.Inflate( maxXExtent * 1.4, maxYExtent * 1.4 ); // add a margin + canvasBox.Inflate( maxXExtent * 2.0, maxYExtent * 2.0 ); view->SetBoundary( canvasBox );