mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Merge branch 'fix/issue-17429-drc-exclusion-instability-8.0' into 'master'
Draft: fix for issue 17429 - DRC exclusions change in project file when no changes are made to board - backported from master See merge request kicad/code/kicad!2123
This commit is contained in:
commit
f089e33544
@ -704,23 +704,37 @@ unsigned int CONNECTIVITY_DATA::GetPadCount( int aNet ) const
|
||||
return n;
|
||||
}
|
||||
|
||||
void sortEdgesOnSerializationForStableOrdering( std::vector<CN_EDGE>& edges )
|
||||
{
|
||||
std::sort(edges.begin(), edges.end(),
|
||||
[](const CN_EDGE& a, const CN_EDGE& b)
|
||||
{
|
||||
return a.SerializeToString() < b.SerializeToString();
|
||||
});
|
||||
}
|
||||
|
||||
void CONNECTIVITY_DATA::RunOnUnconnectedEdges( std::function<bool( CN_EDGE& )> aFunc )
|
||||
{
|
||||
std::vector<CN_EDGE> edges;
|
||||
|
||||
for( RN_NET* rnNet : m_nets )
|
||||
{
|
||||
if( rnNet )
|
||||
{
|
||||
for( CN_EDGE& edge : rnNet->GetEdges() )
|
||||
{
|
||||
if( !aFunc( edge ) )
|
||||
return;
|
||||
edges.push_back( edge );
|
||||
}
|
||||
}
|
||||
}
|
||||
sortEdgesOnSerializationForStableOrdering( edges );
|
||||
for( CN_EDGE& edge : edges )
|
||||
{
|
||||
if( !aFunc( edge ) )
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int getMinDist( BOARD_CONNECTED_ITEM* aItem, const VECTOR2I& aPoint )
|
||||
{
|
||||
switch( aItem->Type() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user