Ensure preview pad has access to parent board design settings

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6057
This commit is contained in:
Jon Evans 2020-10-18 15:27:30 -04:00
parent e735d21824
commit 2e50723781
1 changed files with 4 additions and 0 deletions

View File

@ -169,6 +169,10 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
else // We are editing a "master" pad, i.e. a template to create new pads
*m_dummyPad = *m_padMaster;
// Pad needs to have a parent for painting; use the parent board for its design settings
if( !m_dummyPad->GetParent() )
m_dummyPad->SetParent( m_board );
initValues();
wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );