diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 5cb7639f1c..6788f2f280 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/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(); - 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(); diff --git a/pcbnew/tools/drc_tool.cpp b/pcbnew/tools/drc_tool.cpp index bd24e8570c..03ebc4fea7 100644 --- a/pcbnew/tools/drc_tool.cpp +++ b/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.... - } - } }