Browse Source

Fix inadvertent logic bug in SearchClusters

The safety changes in 3d526edc introduced a subtle
bug where aExcludeZones was not actually excluding
zones anymore because its behavior depended on the
item visited flag being set to true by a previous
call to the function.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20090
revert-0c36e162
Jon Evans 10 months ago
parent
commit
51f56ab31c
  1. 3
      pcbnew/connectivity/connectivity_algo.cpp

3
pcbnew/connectivity/connectivity_algo.cpp

@ -390,6 +390,9 @@ CN_CONNECTIVITY_ALGO::SearchClusters( CLUSTER_SEARCH_MODE aMode, bool aExcludeZo
if( withinAnyNet && n->Net() != root->Net() )
continue;
if( aExcludeZones && n->Parent()->Type() == PCB_ZONE_T )
continue;
if( !visited.contains( n ) && n->Valid() )
{
visited.insert( n );

Loading…
Cancel
Save