Eeschema: ensure a hop over coordinate in entered only once for a given wire

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21164
This commit is contained in:
jean-pierre charras
2025-06-20 10:35:11 +02:00
parent 23d64221e3
commit c56ad6fecb
+5 -2
View File
@@ -1084,11 +1084,14 @@ std::vector<VECTOR3I> SCH_LINE::BuildWireWithHopShape( const SCH_SCREEN* aScreen
if( IsEndPoint( *intersect ) || existingLine->IsEndPoint( *intersect ) )
continue;
intersections.push_back( *intersect );
// Ensure intersecting point is not yet entered. it can be already just entered
// if more than two wires are intersecting at the same point,
// creating bad hop over shapes for the current wire
if( intersections.size() == 0 || intersections.back() != *intersect )
intersections.push_back( *intersect );
}
}
if( intersections.empty() )
{
wire_shape.emplace_back( currentLineStartPoint.x, currentLineStartPoint.y, 0 );