Don't allow netclass assignment to auto-generated net-names.

They can change the next time they're generated so it's just asking
for heartache.

Fixes https://gitlab.com/kicad/code/kicad/issues/5972
This commit is contained in:
Jeff Young 2020-10-12 00:29:06 +01:00
parent b92cb5c930
commit fbb20d08cd
2 changed files with 14 additions and 1 deletions

View File

@ -137,6 +137,14 @@ public:
*/
static PRIORITY GetDriverPriority( SCH_ITEM* aDriver );
PRIORITY GetDriverPriority()
{
if( m_driver )
return GetDriverPriority( m_driver );
else
return PRIORITY::NONE;
}
CONNECTION_GRAPH* m_graph;
bool m_dirty;

View File

@ -156,7 +156,12 @@ std::vector<wxString> SCHEMATIC::GetNetClassAssignmentCandidates()
// Key is a NET_NAME_CODE aka std::pair<name, code>
for( const NET_MAP::value_type& pair: m_connectionGraph->GetNetMap() )
names.emplace_back( pair.first.first );
{
CONNECTION_SUBGRAPH* subgraph = pair.second[0];
if( subgraph->GetDriverPriority() > CONNECTION_SUBGRAPH::PRIORITY::PIN )
names.emplace_back( pair.first.first );
}
return names;
}