From 7db4a3f702271286542812ae287c89541157a069 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 3 Jun 2020 12:12:19 +0100 Subject: [PATCH] Fix offset issue when pad edited from board instead of modEdit. --- pcbnew/dialogs/dialog_pad_properties.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 220603bc3a..caf54d020a 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -600,7 +600,6 @@ void DIALOG_PAD_PROPERTIES::initValues() // Type of pad selection bool aperture = m_dummyPad->GetAttribute() == PAD_ATTRIB_CONN && m_dummyPad->IsAperturePad(); - bool mechanical = m_dummyPad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED; if( aperture ) { @@ -1252,7 +1251,8 @@ void DIALOG_PAD_PROPERTIES::redraw() if( maxYExtent > INT_MAX / 4 ) maxYExtent = INT_MAX / 4; - BOX2D viewBox, canvasBox; + 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 );