Be more targetted on when we load DRC Rules for better performance.
This commit is contained in:
parent
a69a4be853
commit
8ee72853fb
|
@ -1041,7 +1041,16 @@ void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer )
|
||||||
void PCB_EDIT_FRAME::onBoardLoaded()
|
void PCB_EDIT_FRAME::onBoardLoaded()
|
||||||
{
|
{
|
||||||
DRC_TOOL* drcTool = m_toolManager->GetTool<DRC_TOOL>();
|
DRC_TOOL* drcTool = m_toolManager->GetTool<DRC_TOOL>();
|
||||||
drcTool->Reset( TOOL_BASE::MODEL_RELOAD );
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
drcTool->GetDRCEngine()->InitEngine( 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....
|
||||||
|
}
|
||||||
|
|
||||||
UpdateTitle();
|
UpdateTitle();
|
||||||
|
|
||||||
|
|
|
@ -62,19 +62,6 @@ void DRC_TOOL::Reset( RESET_REASON aReason )
|
||||||
m_pcb = m_editFrame->GetBoard();
|
m_pcb = m_editFrame->GetBoard();
|
||||||
m_drcEngine = m_pcb->GetDesignSettings().m_DRCEngine;
|
m_drcEngine = m_pcb->GetDesignSettings().m_DRCEngine;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aReason == MODEL_RELOAD && m_pcb->GetProject() )
|
|
||||||
{
|
|
||||||
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....
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue