More explicit pad-missing message when net involved.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16489
This commit is contained in:
Jeff Young 2024-01-01 10:45:18 +00:00
parent 58b7eda47a
commit 15a2d65a0c
1 changed files with 18 additions and 7 deletions

View File

@ -180,8 +180,19 @@ void DRC_TEST_PROVIDER_SCHEMATIC_PARITY::testNetlist( NETLIST& aNetlist )
if( !footprint->FindPadByNumber( sch_net.GetPinName() ) )
{
wxString msg;
msg.Printf( _( "No pad found for pin %s in schematic." ),
sch_net.GetPinName() );
if( sch_net.GetNetName().StartsWith( wxT( "unconnected-" ) ) )
{
msg = sch_net.GetPinName();
}
else
{
msg = wxString::Format( wxT( "%s (%s)" ),
sch_net.GetPinName(),
sch_net.GetNetName() );
}
msg.Printf( _( "No pad found for pin %s in schematic." ), msg );
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_NET_CONFLICT );
drcItem->SetErrorMessage( msg );