Properly construct new line from old
Fixes: lp:1823072 * https://bugs.launchpad.net/kicad/+bug/1823072
This commit is contained in:
parent
d8cc2f8280
commit
591894c7e6
|
@ -457,7 +457,8 @@ EDA_ITEM* SCH_LINE::MergeOverlap( SCH_LINE* aLine )
|
||||||
if( ( leftmost_start == other_start ) &&
|
if( ( leftmost_start == other_start ) &&
|
||||||
( leftmost_end == other_end ) ) // Trivial case
|
( leftmost_end == other_end ) ) // Trivial case
|
||||||
{
|
{
|
||||||
auto ret = new SCH_LINE( leftmost_start );
|
auto ret = new SCH_LINE( *aLine );
|
||||||
|
ret->SetStartPoint( leftmost_start );
|
||||||
ret->SetEndPoint( leftmost_end );
|
ret->SetEndPoint( leftmost_end );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -495,7 +496,8 @@ EDA_ITEM* SCH_LINE::MergeOverlap( SCH_LINE* aLine )
|
||||||
{
|
{
|
||||||
leftmost_end = rightmost_end;
|
leftmost_end = rightmost_end;
|
||||||
|
|
||||||
auto ret = new SCH_LINE( leftmost_start );
|
auto ret = new SCH_LINE( *aLine );
|
||||||
|
ret->SetStartPoint( leftmost_start );
|
||||||
ret->SetEndPoint( leftmost_end );
|
ret->SetEndPoint( leftmost_end );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue