Ensure that we are not calculating self-collision
Ratsnest may have connections from a zone to two different items. This should be avoided as we never want to draw the ratsnest line with the same element as start and finish Fixes https://gitlab.com/kicad/code/kicad/-/issues/17763
This commit is contained in:
parent
2a3b597ab9
commit
8760519a87
|
@ -388,7 +388,10 @@ void RN_NET::OptimizeRNEdges()
|
|||
{
|
||||
CN_ZONE_LAYER* zoneLayerB = dynamic_cast<CN_ZONE_LAYER*>( itemB );
|
||||
|
||||
if( zoneLayerB && zoneLayerB->Layer() == zoneLayerA->Layer() )
|
||||
if( !zoneLayerB || zoneLayerB == zoneLayerA )
|
||||
continue;
|
||||
|
||||
if( zoneLayerB->Layer() == zoneLayerA->Layer() )
|
||||
{
|
||||
// Process the first matching layer. We don't really care if it's
|
||||
// the "best" layer or not, as anything will be better than the
|
||||
|
|
Loading…
Reference in New Issue