Commit b0a2d7a4 authored by charras's avatar charras
Browse files

fixed seg fault in DRC just after a .ses import

parent 64f501ba
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -187,6 +187,10 @@ int DRC::Drc( ZONE_CONTAINER * aArea, int CornerIndex )

void DRC::RunTests()
{
    // Ensure ratsnest is up to date:
    if( (m_pcb->m_Status_Pcb & LISTE_CHEVELU_OK) == 0 )
        m_mainWindow->Compile_Ratsnest( NULL, true );

    // someone should have cleared the two lists before calling this.

    // test pad to pad clearances, nothing to do with tracks, vias or zones.
@@ -197,7 +201,7 @@ void DRC::RunTests()
    testTracks();

    // Before testing segments and unconnected, refill all zones:
    // this is a good caution, and mandatory if using filling zones by solid polygons
    // this is a good caution, because filled areas can be outdated.
    m_mainWindow->Fill_All_Zones( false );

    // test zone clearances to other zones, pads, tracks, and vias
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ librairi.o: librairi.cpp

edgemod.o: edgemod.cpp

muonde.o: muonde.cpp drag.h gen_self.h
muonde.o: muonde.cpp drag.h

autorout.o: autorout.cpp cell.h autorout.h

+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
 *  Must be called after a board change (changes for
 *  pads, footprints or a read netlist ).
 *
 *  if display_status_pcb != 0 : Display the computation results
 *  if display_status_pcb == true : Display the computation results
 */
{
    wxString msg;
+9 −0
Original line number Diff line number Diff line
@@ -116,6 +116,15 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
    GetScreen()->SetModify();
    GetBoard()->m_Status_Pcb = 0;
    
    /* At this point we should call Compile_Ratsnest()
     * but this could be time consumming.
     * So if incorrect number of Connecred and No connected pads is accepted
     * until Compile_Ratsnest() is called (when track tool selected for instance)
     * leave the next line commented
     * Otherwise uncomment this line
    */
    //Compile_Ratsnest( NULL, true );

    Affiche_Message( wxString( _("Session file imported and merged OK.")) );

    DrawPanel->Refresh( TRUE );