mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 15:40:10 +00:00
Check for missing courtyards in footprint checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19678
This commit is contained in:
parent
d53ed205f2
commit
f0d1052547
@ -144,6 +144,14 @@ void DIALOG_FOOTPRINT_CHECKER::runChecks()
|
||||
|
||||
footprint->BuildCourtyardCaches( &outlineErrorHandler );
|
||||
|
||||
if( ( footprint->GetAttributes() & FP_ALLOW_MISSING_COURTYARD ) == 0
|
||||
&& footprint->GetCourtyard( F_CrtYd ).OutlineCount() == 0
|
||||
&& footprint->GetCourtyard( B_CrtYd ).OutlineCount() == 0 )
|
||||
{
|
||||
errorHandler( footprint, nullptr, nullptr, DRCE_MISSING_COURTYARD, wxEmptyString,
|
||||
{ 0, 0 } );
|
||||
}
|
||||
|
||||
footprint->CheckFootprintAttributes(
|
||||
[&]( const wxString& aMsg )
|
||||
{
|
||||
|
@ -44,6 +44,7 @@ using namespace std::placeholders;
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <board_design_settings.h>
|
||||
#include <drc/drc_item.h>
|
||||
#include <view/view_controls.h>
|
||||
#include <widgets/lib_tree.h>
|
||||
#include <widgets/wx_progress_reporters.h>
|
||||
@ -103,6 +104,9 @@ bool FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard( FOOTPRINT* aFootprint )
|
||||
if( !Clear_Pcb( true ) )
|
||||
return false;
|
||||
|
||||
std::map<int, SEVERITY>& severities = GetBoard()->GetDesignSettings().m_DRCSeverities;
|
||||
severities[ DRCE_MISSING_COURTYARD ] = RPT_SEVERITY_WARNING;
|
||||
|
||||
m_boardFootprintUuids.clear();
|
||||
|
||||
auto recordAndUpdateUuid =
|
||||
|
Loading…
Reference in New Issue
Block a user