Make sure new DRC_ENGINE is initialized.

Fixes https://gitlab.com/kicad/code/kicad/issues/5824
This commit is contained in:
Jeff Young 2020-10-01 23:43:34 +01:00
parent b369506697
commit daac95400f
1 changed files with 11 additions and 0 deletions

View File

@ -152,6 +152,17 @@ BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat )
BOARD_DESIGN_SETTINGS& bds = brd->GetDesignSettings();
bds.m_DRCEngine = std::make_shared<DRC_ENGINE>( brd, &bds );
try
{
wxFileName rules = pro;
rules.SetExt( DesignRulesFileExtension );
bds.m_DRCEngine->InitEngine( rules );
}
catch( ... )
{
// Best efforts...
}
for( MARKER_PCB* marker : brd->ResolveDRCExclusions() )
brd->Add( marker );