Eeschema: Remove zero-length wires in RemoveBacktracks

RemoveBacktracks call removes zero-length wires as well
This commit is contained in:
Seth Hillbrand 2017-10-31 12:33:00 -07:00 committed by Wayne Stambaugh
parent 692fecea9a
commit c6632bdded
1 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,12 @@ static void RemoveBacktracks( DLIST<SCH_ITEM>& aWires )
SCH_LINE *line = static_cast<SCH_LINE*>( p ); SCH_LINE *line = static_cast<SCH_LINE*>( p );
p = line->Next(); p = line->Next();
if( line->IsNull() )
{
delete s_wires.Remove( line );
continue;
}
if( !last_lines.empty() ) if( !last_lines.empty() )
{ {
SCH_LINE* last_line = last_lines[last_lines.size() - 1]; SCH_LINE* last_line = last_lines[last_lines.size() - 1];