Make DRC exclusions work in cli & python DRC
The way exclusions work is actually silly, and you can end up with your project file losing them too. Fixes https://gitlab.com/kicad/code/kicad/-/issues/11562
This commit is contained in:
@@ -585,9 +585,15 @@ bool WriteDRCReport( BOARD* aBoard, const wxString& aFileName, EDA_UNITS aUnits,
|
||||
}
|
||||
} );
|
||||
|
||||
aBoard->RecordDRCExclusions();
|
||||
aBoard->DeleteMARKERs( true, true );
|
||||
engine->RunTests( aUnits, aReportAllTrackErrors, false );
|
||||
engine->ClearViolationHandler();
|
||||
|
||||
// now "resolve" the drc exclusions again because its the only way to set exclusion status on a marker
|
||||
for( PCB_MARKER* marker : aBoard->ResolveDRCExclusions( false ) )
|
||||
aBoard->Add( marker );
|
||||
|
||||
// TODO: Unify this with DIALOG_DRC::writeReport
|
||||
|
||||
FILE* fp = wxFopen( aFileName, wxT( "w" ) );
|
||||
|
||||
Reference in New Issue
Block a user