Not connected pins should not get connected

This prevents splitting wires/busses on the NC pin end.  It also keeps
NC pins out of the netlist.

Fixes https://gitlab.com/kicad/code/kicad/issues/6777
This commit is contained in:
Seth Hillbrand 2020-12-17 11:34:09 -08:00
parent aab3c936f0
commit 7b9c21e290
2 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include <profile.h>
#include <common.h>
#include <erc.h>
#include <pin_type.h>
#include <sch_bus_entry.h>
#include <sch_component.h>
#include <sch_edit_frame.h>
@ -526,6 +527,10 @@ void CONNECTION_GRAPH::updateItemConnectivity( const SCH_SHEET_PATH& aSheet,
for( SCH_PIN* pin : component->GetPins( &aSheet ) )
{
// Not connected pins are not connected.
if( pin->GetType() == ELECTRICAL_PINTYPE::PT_NC )
continue;
pin->InitializeConnection( aSheet, this );
wxPoint pos = pin->GetPosition();

View File

@ -1796,6 +1796,9 @@ bool SCH_COMPONENT::doIsConnected( const wxPoint& aPosition ) const
for( const auto& pin : m_pins )
{
if( pin->GetType() == ELECTRICAL_PINTYPE::PT_NC )
continue;
// Collect only pins attached to the current unit and convert.
// others are not associated to this component instance
int pin_unit = pin->GetLibPin()->GetUnit();