From 10ece80b5a62defccbd1d57493a003491f222b98 Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Tue, 18 Dec 2007 00:04:08 +0000 Subject: [PATCH] when drc denies via insertion, bridge track not deleted --- pcbnew/editrack-part2.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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; }