CADSTAR PCB: Keep all tracks as a single chain where possible

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8119
This commit is contained in:
Roberto Fernandez Bautista 2021-04-05 20:12:59 +01:00
parent d041578150
commit 9a764126ce
1 changed files with 2 additions and 0 deletions

View File

@ -2915,6 +2915,8 @@ std::vector<TRACK*> CADSTAR_PCB_ARCHIVE_LOADER::makeTracksFromDrawsegments(
// Apply route offsetting, mimmicking the behaviour of the CADSTAR post processor // Apply route offsetting, mimmicking the behaviour of the CADSTAR post processor
if( prevTrack != nullptr ) if( prevTrack != nullptr )
{ {
track->SetStart( prevTrack->GetEnd() ); // remove discontinuities if possible
int offsetAmount = ( track->GetWidth() / 2 ) - ( prevTrack->GetWidth() / 2 ); int offsetAmount = ( track->GetWidth() / 2 ) - ( prevTrack->GetWidth() / 2 );
if( offsetAmount > 0 ) if( offsetAmount > 0 )