Setup Footprint-Editor-specific severities.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18102
This commit is contained in:
parent
139d356065
commit
f7b971ecb7
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
#include <footprint_edit_frame.h>
|
#include <footprint_edit_frame.h>
|
||||||
#include <widgets/appearance_controls.h>
|
#include <widgets/appearance_controls.h>
|
||||||
|
#include <drc/drc_item.h>
|
||||||
|
|
||||||
|
|
||||||
bool PCB_EDIT_FRAME::Clear_Pcb( bool doAskAboutUnsavedChanges, bool aFinal )
|
bool PCB_EDIT_FRAME::Clear_Pcb( bool doAskAboutUnsavedChanges, bool aFinal )
|
||||||
|
@ -141,6 +142,20 @@ bool FOOTPRINT_EDIT_FRAME::Clear_Pcb( bool doAskAboutUnsavedChanges )
|
||||||
// This board will only be used to hold a footprint for editing
|
// This board will only be used to hold a footprint for editing
|
||||||
GetBoard()->SetBoardUse( BOARD_USE::FPHOLDER );
|
GetBoard()->SetBoardUse( BOARD_USE::FPHOLDER );
|
||||||
|
|
||||||
|
// Setup our own severities for the Footprint Checker.
|
||||||
|
// These are not (at present) user-editable.
|
||||||
|
std::map<int, SEVERITY>& drcSeverities = GetBoard()->GetDesignSettings().m_DRCSeverities;
|
||||||
|
|
||||||
|
for( int errorCode = DRCE_FIRST; errorCode <= DRCE_LAST; ++errorCode )
|
||||||
|
drcSeverities[ errorCode ] = RPT_SEVERITY_ERROR;
|
||||||
|
|
||||||
|
drcSeverities[ DRCE_DRILLED_HOLES_COLOCATED ] = RPT_SEVERITY_WARNING;
|
||||||
|
drcSeverities[ DRCE_DRILLED_HOLES_TOO_CLOSE ] = RPT_SEVERITY_WARNING;
|
||||||
|
|
||||||
|
drcSeverities[ DRCE_PADSTACK ] = RPT_SEVERITY_WARNING;
|
||||||
|
|
||||||
|
drcSeverities[ DRCE_FOOTPRINT_TYPE_MISMATCH ] = RPT_SEVERITY_WARNING;
|
||||||
|
|
||||||
// clear filename, to avoid overwriting an old file
|
// clear filename, to avoid overwriting an old file
|
||||||
GetBoard()->SetFileName( wxEmptyString );
|
GetBoard()->SetFileName( wxEmptyString );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue