Reload DRC rules on MODEL_RELOAD.

Fixes https://gitlab.com/kicad/code/kicad/issues/5794
This commit is contained in:
Jeff Young 2020-09-26 16:48:36 +01:00
parent f8875bc5a6
commit 7300640da0
1 changed files with 13 additions and 0 deletions

View File

@ -63,6 +63,19 @@ void DRC_TOOL::Reset( RESET_REASON aReason )
m_pcb = m_editFrame->GetBoard();
m_drcEngine = m_pcb->GetDesignSettings().m_DRCEngine;
}
if( aReason == MODEL_RELOAD )
{
try
{
m_drcEngine->InitEngine( m_editFrame->GetDesignRulesPath() );
}
catch( PARSE_ERROR& pe )
{
// Not sure this is the best place to tell the user their rules are buggy, so
// we'll stay quiet for now. Feel free to revisit this decision....
}
}
}