diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index ffe9f2f3f2..a46fcbb949 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -246,7 +246,16 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* track, wxDC* DC ) /* DRC fault: the Via cannot be placed here ... */ delete Via; GetScreen()->m_Active_Layer = old_layer; + DrawPanel->ManageCurseur( DrawPanel, DC, FALSE ); + + // delete the track(s) added in Begin_Route() + while( g_TrackSegmentCount > itmp ) + { + Delete_Segment( DC, g_CurrentTrackSegment ); + } + SetCurItem( g_CurrentTrackSegment ); + return false; }