Generalize ERCItem inspections.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10539
This commit is contained in:
Jeff Young 2024-02-16 13:22:17 +00:00
parent e7abeb3c38
commit f77de66f4e
17 changed files with 188 additions and 52 deletions

View File

@ -582,16 +582,18 @@ void DIALOG_ERC::OnERCItemDClick( wxDataViewEvent& aEvent )
void DIALOG_ERC::OnERCItemRClick( wxDataViewEvent& aEvent )
{
RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
TOOL_MANAGER* toolMgr = m_parent->GetToolManager();
EE_INSPECTION_TOOL* inspectionTool = toolMgr->GetTool<EE_INSPECTION_TOOL>();
RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
if( !node )
return;
ERC_SETTINGS& settings = m_parent->Schematic().ErcSettings();
std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
wxString listName;
wxMenu menu;
std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
wxString listName;
wxMenu menu;
switch( settings.GetSeverity( rcItem->GetErrorCode() ) )
{
@ -607,6 +609,7 @@ void DIALOG_ERC::OnERCItemRClick( wxDataViewEvent& aEvent )
ID_REMOVE_EXCLUSION_ALL,
ID_ADD_EXCLUSION,
ID_ADD_EXCLUSION_ALL,
ID_INSPECT_VIOLATION,
ID_EDIT_PIN_CONFLICT_MAP,
ID_EDIT_CONNECTION_GRID,
ID_SET_SEVERITY_TO_ERROR,
@ -631,6 +634,11 @@ void DIALOG_ERC::OnERCItemRClick( wxDataViewEvent& aEvent )
wxString::Format( _( "It will be excluded from the %s list" ), listName ) );
}
wxString inspectERCErrorMenuText = inspectionTool->InspectERCErrorMenuText( rcItem );
if( !inspectERCErrorMenuText.IsEmpty() )
menu.Append( ID_INSPECT_VIOLATION, inspectERCErrorMenuText );
menu.AppendSeparator();
if( rcItem->GetErrorCode() == ERCE_PIN_TO_PIN_WARNING
@ -739,6 +747,10 @@ void DIALOG_ERC::OnERCItemRClick( wxDataViewEvent& aEvent )
break;
case ID_INSPECT_VIOLATION:
inspectionTool->InspectERCError( node->m_RcItem );
break;
case ID_SET_SEVERITY_TO_ERROR:
settings.SetSeverity( rcItem->GetErrorCode(), RPT_SEVERITY_ERROR );

View File

@ -935,6 +935,7 @@ int ERC_TESTER::TestLibSymbolIssues()
{
wxCHECK( m_schematic, 0 );
ERC_SETTINGS& settings = m_schematic->ErcSettings();
SYMBOL_LIB_TABLE* libTable = PROJECT_SCH::SchSymbolLibTable( &m_schematic->Prj() );
wxString msg;
int err_count = 0;
@ -957,24 +958,32 @@ int ERC_TESTER::TestLibSymbolIssues()
if( !libTableRow )
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( _( "The current configuration does not include the symbol library '%s'" ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
if( settings.IsTestEnabled( ERCE_LIB_SYMBOL_ISSUES ) )
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( _( "The current configuration does not include the symbol library '%s'" ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) );
}
markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) );
continue;
}
else if( !libTable->HasLibrary( libName, true ) )
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( _( "The library '%s' is not enabled in the current configuration" ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
if( settings.IsTestEnabled( ERCE_LIB_SYMBOL_ISSUES ) )
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( _( "The library '%s' is not enabled in the current configuration" ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) );
}
markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) );
continue;
}
@ -983,25 +992,30 @@ int ERC_TESTER::TestLibSymbolIssues()
if( libSymbol == nullptr )
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( _( "Symbol '%s' not found in symbol library '%s'" ),
UnescapeString( symbolName ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
if( settings.IsTestEnabled( ERCE_LIB_SYMBOL_ISSUES ) )
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
ercItem->SetItems( symbol );
msg.Printf( _( "Symbol '%s' not found in symbol library '%s'" ),
UnescapeString( symbolName ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) );
}
markers.emplace_back( new SCH_MARKER( ercItem, symbol->GetPosition() ) );
continue;
}
std::unique_ptr<LIB_SYMBOL> flattenedSymbol = libSymbol->Flatten();
constexpr int flags = LIB_ITEM::COMPARE_FLAGS::EQUALITY | LIB_ITEM::COMPARE_FLAGS::ERC;
if( flattenedSymbol->Compare( *libSymbolInSchematic, flags ) != 0 )
if( settings.IsTestEnabled( ERCE_LIB_SYMBOL_MISMATCH )
&& flattenedSymbol->Compare( *libSymbolInSchematic, flags ) != 0 )
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_MISMATCH );
ercItem->SetItems( symbol );
msg.Printf( _( "Symbol '%s' has been modified in library '%s'" ),
msg.Printf( _( "Symbol '%s' doesn't match copy in library '%s'" ),
UnescapeString( symbolName ),
UnescapeString( libName ) );
ercItem->SetErrorMessage( msg );
@ -1323,7 +1337,8 @@ void ERC_TESTER::RunTests( DS_PROXY_VIEW_ITEM* aDrawingSheet, SCH_EDIT_FRAME* aE
TestNoConnectPins();
}
if( settings.IsTestEnabled( ERCE_LIB_SYMBOL_ISSUES ) )
if( settings.IsTestEnabled( ERCE_LIB_SYMBOL_ISSUES )
|| settings.IsTestEnabled( ERCE_LIB_SYMBOL_MISMATCH ) )
{
if( aProgressReporter )
aProgressReporter->AdvancePhase( _( "Checking for library symbol issues..." ) );

View File

@ -119,10 +119,6 @@ ERC_ITEM ERC_ITEM::netNotBusMember( ERCE_BUS_ENTRY_CONFLICT,
_( "Net is graphically connected to a bus but not a bus member" ),
wxT( "net_not_bus_member" ) );
ERC_ITEM ERC_ITEM::busLabelSyntax( ERCE_BUS_LABEL_ERROR,
_( "Label attached to bus item does not describe a bus" ),
wxT( "bus_label_syntax" ) );
ERC_ITEM ERC_ITEM::busToBusConflict( ERCE_BUS_TO_BUS_CONFLICT,
_( "Buses are graphically connected but share no bus members" ),
wxT( "bus_to_bus_conflict" ) );
@ -151,6 +147,10 @@ ERC_ITEM ERC_ITEM::libSymbolIssues( ERCE_LIB_SYMBOL_ISSUES,
_( "Library symbol issue" ),
wxT( "lib_symbol_issues" ) );
ERC_ITEM ERC_ITEM::libSymbolMismatch( ERCE_LIB_SYMBOL_MISMATCH,
_( "Symbol doesn't match copy in library" ),
wxT( "lib_symbol_mismatch" ) );
ERC_ITEM ERC_ITEM::footprintLinkIssues( ERCE_FOOTPRINT_LINK_ISSUES,
_( "Footprint link issue" ),
wxT( "footprint_link_issues" ) );
@ -228,6 +228,7 @@ std::vector<std::reference_wrapper<RC_ITEM>> ERC_ITEM::allItemTypes( {
// TODO: Add bus label syntax checking
// ERC_ITEM::busLabelSyntax,
ERC_ITEM::libSymbolIssues,
ERC_ITEM::libSymbolMismatch,
ERC_ITEM::footprintLinkIssues,
ERC_ITEM::extraUnits,
ERC_ITEM::missingUnits,
@ -259,7 +260,6 @@ std::shared_ptr<ERC_ITEM> ERC_ITEM::Create( int aErrorCode )
case ERCE_BUS_ALIAS_CONFLICT: return std::make_shared<ERC_ITEM>( busDefinitionConflict );
case ERCE_DRIVER_CONFLICT: return std::make_shared<ERC_ITEM>( multipleNetNames );
case ERCE_BUS_ENTRY_CONFLICT: return std::make_shared<ERC_ITEM>( netNotBusMember );
case ERCE_BUS_LABEL_ERROR: return std::make_shared<ERC_ITEM>( busLabelSyntax );
case ERCE_BUS_TO_BUS_CONFLICT: return std::make_shared<ERC_ITEM>( busToBusConflict );
case ERCE_BUS_TO_NET_CONFLICT: return std::make_shared<ERC_ITEM>( busToNetConflict );
case ERCE_NETCLASS_CONFLICT: return std::make_shared<ERC_ITEM>( netclassConflict );
@ -269,6 +269,7 @@ std::shared_ptr<ERC_ITEM> ERC_ITEM::Create( int aErrorCode )
case ERCE_SIMULATION_MODEL: return std::make_shared<ERC_ITEM>( simulationModelIssues );
case ERCE_WIRE_DANGLING: return std::make_shared<ERC_ITEM>( wireDangling );
case ERCE_LIB_SYMBOL_ISSUES: return std::make_shared<ERC_ITEM>( libSymbolIssues );
case ERCE_LIB_SYMBOL_MISMATCH: return std::make_shared<ERC_ITEM>( libSymbolMismatch );
case ERCE_FOOTPRINT_LINK_ISSUES: return std::make_shared<ERC_ITEM>( footprintLinkIssues );
case ERCE_UNANNOTATED: return std::make_shared<ERC_ITEM>( unannotated );
case ERCE_EXTRA_UNITS: return std::make_shared<ERC_ITEM>( extraUnits );

View File

@ -202,7 +202,6 @@ private:
static ERC_ITEM multipleNetNames;
static ERC_ITEM netclassConflict;
static ERC_ITEM netNotBusMember;
static ERC_ITEM busLabelSyntax;
static ERC_ITEM busToBusConflict;
static ERC_ITEM busToNetConflict;
static ERC_ITEM unresolvedVariable;
@ -210,6 +209,7 @@ private:
static ERC_ITEM simulationModelIssues;
static ERC_ITEM wireDangling;
static ERC_ITEM libSymbolIssues;
static ERC_ITEM libSymbolMismatch;
static ERC_ITEM footprintLinkIssues;
static ERC_ITEM unannotated;
static ERC_ITEM extraUnits;

View File

@ -101,6 +101,7 @@ ERC_SETTINGS::ERC_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath ) :
m_ERCSeverities[ERCE_DRIVER_CONFLICT] = RPT_SEVERITY_WARNING;
m_ERCSeverities[ERCE_BUS_ENTRY_CONFLICT] = RPT_SEVERITY_WARNING;
m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_WARNING;
m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_WARNING;
m_ERCSeverities[ERCE_FOOTPRINT_LINK_ISSUES] = RPT_SEVERITY_WARNING;
m_ERCSeverities[ERCE_NOCONNECT_CONNECTED] = RPT_SEVERITY_WARNING;
m_ERCSeverities[ERCE_NOCONNECT_NOT_CONNECTED] = RPT_SEVERITY_WARNING;

View File

@ -61,7 +61,6 @@ enum ERCE_T
ERCE_BUS_ALIAS_CONFLICT, ///< Conflicting bus alias definitions across sheets.
ERCE_DRIVER_CONFLICT, ///< Conflicting drivers (labels, etc) on a subgraph.
ERCE_BUS_ENTRY_CONFLICT, ///< A wire connected to a bus doesn't match the bus.
ERCE_BUS_LABEL_ERROR, ///< A label attached to a bus isn't in bus format.
ERCE_BUS_TO_BUS_CONFLICT, ///< A connection between bus objects doesn't share at least
///< one net.
ERCE_BUS_TO_NET_CONFLICT, ///< A bus wire is graphically connected to a net port/pin
@ -69,11 +68,11 @@ enum ERCE_T
ERCE_NETCLASS_CONFLICT, ///< Multiple labels assign different netclasses to same net.
ERCE_GLOBLABEL, ///< A global label is unique.
ERCE_UNRESOLVED_VARIABLE, ///< A text variable could not be resolved.
ERCE_UNDEFINED_NETCLASS, ///< A netclass was referenced by not defined.
ERCE_UNDEFINED_NETCLASS, ///< A netclass was referenced but not defined.
ERCE_SIMULATION_MODEL, ///< An error was found in the simulation model.
ERCE_WIRE_DANGLING, ///< Some wires are not connected to anything else.
ERCE_LIB_SYMBOL_ISSUES, ///< Library symbol changed from current symbol in schematic or
///< the library symbol link no longer valid.
ERCE_LIB_SYMBOL_ISSUES, ///< Symbol not found in active libraries.
ERCE_LIB_SYMBOL_MISMATCH, ///< Symbol doesn't match copy in library.
ERCE_FOOTPRINT_LINK_ISSUES, ///< The footprint link is invalid, or points to a missing
///< (or inactive) footprint or library.
ERCE_UNANNOTATED, ///< Symbol has not been annotated.

View File

@ -271,6 +271,9 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
//
ACTION_MENU* inspectMenu = new ACTION_MENU( false, selTool );
inspectMenu->Add( EE_ACTIONS::showBusSyntaxHelp );
inspectMenu->AppendSeparator();
inspectMenu->Add( EE_ACTIONS::runERC );
inspectMenu->Add( ACTIONS::prevMarker );
inspectMenu->Add( ACTIONS::nextMarker );

View File

@ -61,6 +61,12 @@ TOOL_ACTION EE_ACTIONS::diffSymbol( TOOL_ACTION_ARGS()
.Tooltip( _( "Show differences between schematic symbol and its library equivalent" ) )
.Icon( BITMAPS::library ) );
TOOL_ACTION EE_ACTIONS::showBusSyntaxHelp( TOOL_ACTION_ARGS()
.Name( "eeschema.InspectionTool.showBusSyntaxHelp" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show Bus Syntax Help" ) )
.Icon( BITMAPS::bus_definition_tool ) );
TOOL_ACTION EE_ACTIONS::showSimulator( TOOL_ACTION_ARGS()
.Name( "eeschema.EditorControl.showSimulator" )
.Scope( AS_GLOBAL )

View File

@ -157,6 +157,7 @@ public:
static TOOL_ACTION editPageNumber;
static TOOL_ACTION checkSymbol;
static TOOL_ACTION diffSymbol;
static TOOL_ACTION showBusSyntaxHelp;
static TOOL_ACTION rescueSymbols;
static TOOL_ACTION remapSymbols;

View File

@ -52,7 +52,7 @@
EE_INSPECTION_TOOL::EE_INSPECTION_TOOL() :
EE_TOOL_BASE<SCH_BASE_FRAME>( "eeschema.InspectionTool" )
EE_TOOL_BASE<SCH_BASE_FRAME>( "eeschema.InspectionTool" ), m_busSyntaxHelp( nullptr )
{
}
@ -183,6 +183,68 @@ int EE_INSPECTION_TOOL::CrossProbe( const TOOL_EVENT& aEvent )
}
wxString EE_INSPECTION_TOOL::InspectERCErrorMenuText( const std::shared_ptr<RC_ITEM>& aERCItem )
{
auto menuDescription =
[&]( const TOOL_ACTION& aAction )
{
wxString menuItemLabel = aAction.GetMenuLabel();
wxMenuBar* menuBar = m_frame->GetMenuBar();
for( size_t ii = 0; ii < menuBar->GetMenuCount(); ++ii )
{
for( wxMenuItem* menuItem : menuBar->GetMenu( ii )->GetMenuItems() )
{
if( menuItem->GetItemLabelText() == menuItemLabel )
{
wxString menuTitleLabel = menuBar->GetMenuLabelText( ii );
menuTitleLabel.Replace( wxS( "&" ), wxS( "&&" ) );
menuItemLabel.Replace( wxS( "&" ), wxS( "&&" ) );
return wxString::Format( _( "Run %s > %s" ),
menuTitleLabel,
menuItemLabel );
}
}
}
return wxString::Format( _( "Run %s" ), aAction.GetFriendlyName() );
};
if( aERCItem->GetErrorCode() == ERCE_BUS_TO_NET_CONFLICT )
{
return menuDescription( EE_ACTIONS::showBusSyntaxHelp );
}
else if( aERCItem->GetErrorCode() == ERCE_LIB_SYMBOL_MISMATCH )
{
return menuDescription( EE_ACTIONS::diffSymbol );
}
return wxEmptyString;
}
void EE_INSPECTION_TOOL::InspectERCError( const std::shared_ptr<RC_ITEM>& aERCItem )
{
SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
wxCHECK( frame, /* void */ );
EDA_ITEM* a = frame->GetItem( aERCItem->GetMainItemID() );
if( aERCItem->GetErrorCode() == ERCE_BUS_TO_NET_CONFLICT )
{
m_toolMgr->RunAction( EE_ACTIONS::showBusSyntaxHelp );
}
else if( aERCItem->GetErrorCode() == ERCE_LIB_SYMBOL_MISMATCH )
{
if( SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( a ) )
DiffSymbol( symbol );
}
}
int EE_INSPECTION_TOOL::ExcludeMarker( const TOOL_EVENT& aEvent )
{
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
@ -250,6 +312,20 @@ int EE_INSPECTION_TOOL::CheckSymbol( const TOOL_EVENT& aEvent )
}
int EE_INSPECTION_TOOL::ShowBusSyntaxHelp( const TOOL_EVENT& aEvent )
{
if( m_busSyntaxHelp )
{
m_busSyntaxHelp->Raise();
m_busSyntaxHelp->Show( true );
return 0;
}
m_busSyntaxHelp = SCH_TEXT::ShowSyntaxHelp( m_frame );
return 0;
}
int EE_INSPECTION_TOOL::DiffSymbol( const TOOL_EVENT& aEvent )
{
SCH_EDIT_FRAME* schEditorFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
@ -264,18 +340,28 @@ int EE_INSPECTION_TOOL::DiffSymbol( const TOOL_EVENT& aEvent )
return 0;
}
DiffSymbol( static_cast<SCH_SYMBOL*>( selection.Front() ) );
return 0;
}
void EE_INSPECTION_TOOL::DiffSymbol( SCH_SYMBOL* symbol )
{
SCH_EDIT_FRAME* schEditorFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
wxCHECK( schEditorFrame, /* void */ );
DIALOG_BOOK_REPORTER* dialog = schEditorFrame->GetSymbolDiffDialog();
wxCHECK( dialog, 0 );
wxCHECK( dialog, /* void */ );
dialog->DeleteAllPages();
SCH_SYMBOL* symbol = (SCH_SYMBOL*) selection.Front();
wxString symbolDesc = wxString::Format( _( "Symbol %s" ),
symbol->GetField( REFERENCE_FIELD )->GetText() );
LIB_ID libId = symbol->GetLibId();
wxString libName = libId.GetLibNickname();
wxString symbolName = libId.GetLibItemName();
wxString symbolDesc = wxString::Format( _( "Symbol %s" ),
symbol->GetField( REFERENCE_FIELD )->GetText() );
LIB_ID libId = symbol->GetLibId();
wxString libName = libId.GetLibNickname();
wxString symbolName = libId.GetLibItemName();
WX_HTML_REPORT_BOX* r = dialog->AddHTMLPage( _( "Summary" ) );
@ -354,7 +440,6 @@ int EE_INSPECTION_TOOL::DiffSymbol( const TOOL_EVENT& aEvent )
dialog->Raise();
dialog->Show( true );
return 0;
}
@ -493,6 +578,7 @@ void EE_INSPECTION_TOOL::setTransitions()
Go( &EE_INSPECTION_TOOL::CheckSymbol, EE_ACTIONS::checkSymbol.MakeEvent() );
Go( &EE_INSPECTION_TOOL::DiffSymbol, EE_ACTIONS::diffSymbol.MakeEvent() );
Go( &EE_INSPECTION_TOOL::RunSimulation, EE_ACTIONS::showSimulator.MakeEvent() );
Go( &EE_INSPECTION_TOOL::ShowBusSyntaxHelp, EE_ACTIONS::showBusSyntaxHelp.MakeEvent() );
Go( &EE_INSPECTION_TOOL::ShowDatasheet, EE_ACTIONS::showDatasheet.MakeEvent() );

View File

@ -56,10 +56,16 @@ public:
/// Called when clicking on a item:
int CrossProbe( const TOOL_EVENT& aEvent );
wxString InspectERCErrorMenuText( const std::shared_ptr<RC_ITEM>& aERCItem );
void InspectERCError( const std::shared_ptr<RC_ITEM>& aERCItem );
int ExcludeMarker( const TOOL_EVENT& aEvent );
int ShowBusSyntaxHelp( const TOOL_EVENT& aEvent );
int CheckSymbol( const TOOL_EVENT& aEvent );
int DiffSymbol( const TOOL_EVENT& aEvent );
void DiffSymbol( SCH_SYMBOL* aSymbol );
int RunSimulation( const TOOL_EVENT& aEvent );
@ -75,6 +81,7 @@ private:
void setTransitions() override;
private:
HTML_MESSAGE_BOX* m_busSyntaxHelp;
};
#endif /* EE_INSPECTION_TOOL_H */

View File

@ -334,14 +334,14 @@ wxString BOARD_INSPECTION_TOOL::InspectDRCErrorMenuText( const std::shared_ptr<R
void BOARD_INSPECTION_TOOL::InspectDRCError( const std::shared_ptr<RC_ITEM>& aDRCItem )
{
wxCHECK( m_frame, /* void */ );
BOARD_ITEM* a = m_frame->GetBoard()->GetItem( aDRCItem->GetMainItemID() );
BOARD_ITEM* b = m_frame->GetBoard()->GetItem( aDRCItem->GetAuxItemID() );
BOARD_CONNECTED_ITEM* ac = dynamic_cast<BOARD_CONNECTED_ITEM*>( a );
BOARD_CONNECTED_ITEM* bc = dynamic_cast<BOARD_CONNECTED_ITEM*>( b );
PCB_LAYER_ID layer = m_frame->GetActiveLayer();
wxCHECK( m_frame, /* void */ );
if( aDRCItem->GetErrorCode() == DRCE_LIB_FOOTPRINT_MISMATCH )
{
if( FOOTPRINT* footprint = dynamic_cast<FOOTPRINT*>( a ) )

View File

@ -58,7 +58,8 @@ BOOST_FIXTURE_TEST_CASE( ERCGlobalLabels, ERC_REGRESSION_TEST_FIXTURE )
SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() );
// Skip the "Modified symbol" warning
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE;
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE;
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE;
m_schematic->ConnectionGraph()->Recalculate( m_schematic->GetSheets(), true );
m_schematic->ConnectionGraph()->RunERC();

View File

@ -61,6 +61,7 @@ BOOST_FIXTURE_TEST_CASE( ERCHierarchicalSchematics, ERC_REGRESSION_TEST_FIXTURE
// Skip the "Modified symbol" warning
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE;
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE;
m_schematic->ConnectionGraph()->RunERC();

View File

@ -63,7 +63,8 @@ BOOST_FIXTURE_TEST_CASE( ERCLabelNotConnected, ERC_REGRESSION_TEST_FIXTURE )
SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() );
// Skip the "Modified symbol" warning
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE;
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE;
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE;
m_schematic->ConnectionGraph()->RunERC();

View File

@ -66,7 +66,8 @@ BOOST_FIXTURE_TEST_CASE( ERCNoConnect, ERC_REGRESSION_TEST_FIXTURE )
SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() );
// Skip the "Modified symbol" warning
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE;
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE;
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE;
m_schematic->ConnectionGraph()->RunERC();

View File

@ -60,7 +60,8 @@ BOOST_FIXTURE_TEST_CASE( ERCStackingPins, ERC_REGRESSION_TEST_FIXTURE )
SHEETLIST_ERC_ITEMS_PROVIDER errors( m_schematic.get() );
// Skip the "Modified symbol" warning
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE;
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_ISSUES] = RPT_SEVERITY_IGNORE;
settings.m_ERCSeverities[ERCE_LIB_SYMBOL_MISMATCH] = RPT_SEVERITY_IGNORE;
m_schematic->ConnectionGraph()->RunERC();