Fix inadvertent logic bug in SearchClusters
The safety changes in3d526edcintroduced 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 (cherry picked from commit51f56ab31c) Co-authored-by: Jon Evans <jon@craftyjon.com>
This commit is contained in:
@@ -416,6 +416,9 @@ CN_CONNECTIVITY_ALGO::SearchClusters( CLUSTER_SEARCH_MODE aMode, const std::vect
|
||||
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 );
|
||||
|
||||
Reference in New Issue
Block a user