Fix offset issue when pad edited from board instead of modEdit.

(cherry picked from commit 7db4a3f702)
This commit is contained in:
Jeff Young 2020-06-03 12:12:19 +01:00
parent e099a82d15
commit a844c3043c
1 changed files with 4 additions and 3 deletions

View File

@ -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 );