Commit fbe30472 authored by dickelbeck's avatar dickelbeck

when drc denies via insertion, bridge track not deleted

parent 10ece80b
......@@ -4,19 +4,27 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2007-Dec-17 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
WinEDA_PcbFrame::Other_Layer_Route() was leaving in the bridging segment
when the DRC denied the via insertion.
2007-Dec-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
some changes about zones: enhanced dialog, and files reorganisation.
some changes about zones: enhanced dialog, and files reorganisation
2007-Dec-14 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
WinEDA_PcbFrame::Other_Layer_Route() now returns bool, so that if the DRC
would not allow the new via placement, then it can be checked and the layer
change can also then be aborted. Previously the layer change would happen
in mid track if the via could not be placed.
in mid track even if the via could not be placed.
2007-Dec-13 UPDATE Dick Hollenbeck <dick@softplc.com>
......
......@@ -53,7 +53,6 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] =
{ wxT( "Esc" ), WXK_ESCAPE },
{ wxT( "Delete" ), WXK_DELETE },
{ wxT( "Esc" ), WXK_ESCAPE },
{ wxT( "Tab" ), '\t' },
{ wxT( "Backspace" ), WXK_BACK },
{ wxT( "Insert" ), WXK_INSERT },
......
......@@ -60,7 +60,10 @@ TRACK* WinEDA_GerberFrame::Delete_Segment( wxDC* DC, TRACK* Track )
// modification du trace
Track = g_CurrentTrackSegment;
g_CurrentTrackSegment = (TRACK*) g_CurrentTrackSegment->Pback;
delete Track; g_TrackSegmentCount--;
delete Track;
g_TrackSegmentCount--;
if( g_TrackSegmentCount && (g_CurrentTrackSegment->Type() == TYPEVIA) )
{
......@@ -87,6 +90,7 @@ TRACK* WinEDA_GerberFrame::Delete_Segment( wxDC* DC, TRACK* Track )
return g_CurrentTrackSegment;
}
}
return NULL;
} // Fin traitement si trace en cours
......
......@@ -245,16 +245,21 @@ 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 );
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 );
// use the form of SetCurItem() which does not write to the msg panel,
// SCREEN::SetCurItem(), so the DRC error remains on screen.
// WinEDA_PcbFrame::SetCurItem() calls Display_Infos().
GetScreen()->SetCurItem( g_CurrentTrackSegment );
return false;
}
......
......@@ -1105,7 +1105,7 @@ void WinEDA_DrawPanel::OnKeyEvent( wxKeyEvent& event )
/* Compute absolute m_MousePosition in user units: */
Screen->m_MousePosition = CursorRealPosition( Screen->m_MousePositionInPixels );
#else
#else
/* if wxGetMousePosition() does not exist,
* m_Cursor should be ok, use it to calculate the cursor position on screen
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment