Browse Source

Be more targetted on when we load DRC Rules for better performance.

6.0.7
Jeff Young 5 years ago
parent
commit
8ee72853fb
  1. 11
      pcbnew/pcb_edit_frame.cpp
  2. 13
      pcbnew/tools/drc_tool.cpp

11
pcbnew/pcb_edit_frame.cpp

@ -1041,7 +1041,16 @@ void PCB_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer )
void PCB_EDIT_FRAME::onBoardLoaded()
{
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();

13
pcbnew/tools/drc_tool.cpp

@ -62,19 +62,6 @@ void DRC_TOOL::Reset( RESET_REASON aReason )
m_pcb = m_editFrame->GetBoard();
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…
Cancel
Save