Eeschema: Only assign nets with resolved netclasses to the label map
Also fixes a bug where the pattern assignment cache was not cleared
if all pattern assignments were deleted in the setup netclasses
panel.
Cherry-picked from 9e1a5eb1bd
This commit is contained in:
parent
f60b76696a
commit
8dbdc3717c
|
@ -442,13 +442,10 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
|
||||||
wxString netclass = m_assignmentGrid->GetCellValue( row, 1 );
|
wxString netclass = m_assignmentGrid->GetCellValue( row, 1 );
|
||||||
|
|
||||||
m_netSettings->m_NetClassPatternAssignments.push_back(
|
m_netSettings->m_NetClassPatternAssignments.push_back(
|
||||||
{
|
{ std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ), netclass } );
|
||||||
std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ),
|
}
|
||||||
netclass
|
|
||||||
} );
|
|
||||||
|
|
||||||
m_netSettings->m_NetClassPatternAssignmentCache.clear();
|
m_netSettings->m_NetClassPatternAssignmentCache.clear();
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2375,9 +2375,6 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( netclass.IsEmpty() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if( !driverSubgraph )
|
if( !driverSubgraph )
|
||||||
driverSubgraph = subgraphs.front();
|
driverSubgraph = subgraphs.front();
|
||||||
|
|
||||||
|
@ -2387,6 +2384,9 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||||
{
|
{
|
||||||
for( const auto& member : driverSubgraph->m_driver_connection->Members() )
|
for( const auto& member : driverSubgraph->m_driver_connection->Members() )
|
||||||
{
|
{
|
||||||
|
if( netclass.IsEmpty() )
|
||||||
|
netSettings->m_NetClassLabelAssignments.erase( member->Name() );
|
||||||
|
else
|
||||||
netSettings->m_NetClassLabelAssignments[member->Name()] = netclass;
|
netSettings->m_NetClassLabelAssignments[member->Name()] = netclass;
|
||||||
|
|
||||||
auto ii = m_net_name_to_subgraphs_map.find( member->Name() );
|
auto ii = m_net_name_to_subgraphs_map.find( member->Name() );
|
||||||
|
@ -2396,10 +2396,18 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( netclass.IsEmpty() )
|
||||||
|
netSettings->m_NetClassLabelAssignments.erase( netname );
|
||||||
|
else
|
||||||
netSettings->m_NetClassLabelAssignments[netname] = netclass;
|
netSettings->m_NetClassLabelAssignments[netname] = netclass;
|
||||||
|
|
||||||
|
if( oldAssignments.count( netname ) )
|
||||||
|
{
|
||||||
if( oldAssignments[netname] != netclass )
|
if( oldAssignments[netname] != netclass )
|
||||||
dirtySubgraphs( subgraphs );
|
dirtySubgraphs( subgraphs );
|
||||||
|
}
|
||||||
|
else if( !netclass.IsEmpty() )
|
||||||
|
dirtySubgraphs( subgraphs );
|
||||||
};
|
};
|
||||||
|
|
||||||
for( const auto& [ netname, subgraphs ] : m_net_name_to_subgraphs_map )
|
for( const auto& [ netname, subgraphs ] : m_net_name_to_subgraphs_map )
|
||||||
|
|
Loading…
Reference in New Issue