eeschema: fix mistaken wire removal bug
The wire between two points should not be trimmed if it starts or ends on one of the component's connection points.
This commit is contained in:
parent
3024ded91e
commit
d2906f7975
|
@ -340,12 +340,14 @@ void SCH_EDIT_FRAME::EndSegment()
|
|||
|
||||
std::vector< wxPoint > pts;
|
||||
item->GetConnectionPoints( pts );
|
||||
std::remove_if( pts.begin(), pts.end(), [ segment ]( const wxPoint& aPt )
|
||||
{ return segment->IsEndPoint( aPt ); } );
|
||||
|
||||
if( pts.size() > 2 )
|
||||
continue;
|
||||
|
||||
// Do not trim wires that connect directly to an endpoint
|
||||
pts.erase( std::remove_if( pts.begin(), pts.end(), [ &segment ]( const wxPoint& aPt )
|
||||
{ return segment->IsEndPoint( aPt ); } ), pts.end() );
|
||||
|
||||
for( auto i = pts.begin(); i != pts.end(); i++ )
|
||||
for( auto j = i + 1; j != pts.end(); j++ )
|
||||
TrimWire( *i, *j, true );
|
||||
|
|
Loading…
Reference in New Issue