diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index 3f7f8f6051..37c92a7578 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -641,6 +641,8 @@ void DRC_ENGINE::InitEngine( const wxFileName& aRulePath ) m_constraintMap.clear(); + m_board->IncrementTimeStamp(); // Clear board-level caches + try // attempt to load full set of rules (implicit + user rules) { loadImplicitRules(); diff --git a/pcbnew/tools/zone_filler_tool.cpp b/pcbnew/tools/zone_filler_tool.cpp index 091cb2cef3..f46e3b7968 100644 --- a/pcbnew/tools/zone_filler_tool.cpp +++ b/pcbnew/tools/zone_filler_tool.cpp @@ -95,26 +95,29 @@ void ZONE_FILLER_TOOL::singleShotRefocus( wxIdleEvent& ) void ZONE_FILLER_TOOL::FillAllZones( wxWindow* aCaller, PROGRESS_REPORTER* aReporter ) { + PCB_EDIT_FRAME* frame = getEditFrame(); + BOARD_COMMIT commit( this ); std::vector toFill; - BOARD_COMMIT commit( this ); - for( ZONE* zone : board()->Zones() ) toFill.push_back( zone ); + board()->IncrementTimeStamp(); // Clear caches + ZONE_FILLER filler( board(), &commit ); if( !board()->GetDesignSettings().m_DRCEngine->RulesValid() ) { - WX_INFOBAR* infobar = frame()->GetInfoBar(); + WX_INFOBAR* infobar = frame->GetInfoBar(); wxHyperlinkCtrl* button = new wxHyperlinkCtrl( infobar, wxID_ANY, _("Show DRC rules"), wxEmptyString ); - button->Bind( wxEVT_COMMAND_HYPERLINK, std::function( - [&]( wxHyperlinkEvent& aEvent ) - { - getEditFrame()->ShowBoardSetupDialog( _( "Rules" ) ); - } ) ); + button->Bind( wxEVT_COMMAND_HYPERLINK, + std::function( + [&]( wxHyperlinkEvent& aEvent ) + { + frame->ShowBoardSetupDialog( _( "Rules" ) ); + } ) ); infobar->RemoveAllButtons(); infobar->AddButton( button ); @@ -133,7 +136,7 @@ void ZONE_FILLER_TOOL::FillAllZones( wxWindow* aCaller, PROGRESS_REPORTER* aRepo if( filler.Fill( toFill ) ) { commit.Push( _( "Fill Zone(s)" ), true ); // Allow undoing zone fill - getEditFrame()->m_ZoneFillsDirty = false; + frame->m_ZoneFillsDirty = false; } else { @@ -141,7 +144,7 @@ void ZONE_FILLER_TOOL::FillAllZones( wxWindow* aCaller, PROGRESS_REPORTER* aRepo } if( filler.IsDebug() ) - getEditFrame()->UpdateUserInterface(); + frame->UpdateUserInterface(); canvas()->Refresh();