Make sure DRC engine works at startup

If we wait to initialize this until later, some
routing operations will not work properly as the
constraints will be empty
This commit is contained in:
Jon Evans 2023-12-10 23:00:19 -05:00
parent 47ab6f8d03
commit 8a474879c5
1 changed files with 10 additions and 0 deletions

View File

@ -396,6 +396,16 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
setupUnits( config() );
// Ensure the DRC engine is initialized so that constraints can be resolved even before a
// board is loaded or saved
try
{
m_toolManager->GetTool<DRC_TOOL>()->GetDRCEngine()->InitEngine( wxFileName() );
}
catch( PARSE_ERROR& )
{
}
// Ensure the Python interpreter is up to date with its environment variables
PythonSyncEnvironmentVariables();
PythonSyncProjectName();