Better fix for #15217

Rather than rely on a quirk, we avoid the modified structure

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15217

(cherry picked from commit 248404a0d1)
This commit is contained in:
Seth Hillbrand 2023-08-04 13:58:11 -07:00
parent ef7ec13861
commit 2d96c6ad22
1 changed files with 3 additions and 1 deletions

View File

@ -2417,7 +2417,9 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo
// member to have the correct connection info // member to have the correct connection info
if( conn->IsBus() && !stale_bus_members.empty() ) if( conn->IsBus() && !stale_bus_members.empty() )
{ {
for( SCH_CONNECTION* stale_member : stale_bus_members ) std::unordered_set<SCH_CONNECTION*> cached_members = stale_bus_members;
for( SCH_CONNECTION* stale_member : cached_members )
{ {
for( CONNECTION_SUBGRAPH* subgraph : visited ) for( CONNECTION_SUBGRAPH* subgraph : visited )
{ {