diff --git a/pcbnew/connect.cpp b/pcbnew/connect.cpp index 3affa82bac..3516b62822 100644 --- a/pcbnew/connect.cpp +++ b/pcbnew/connect.cpp @@ -361,8 +361,6 @@ void WinEDA_BasePcbFrame::test_1_net_connexion( wxDC* DC, int net_code ) } -bool zflg; // DEBUG, must be removed - /***************************************************************************/ static void calcule_connexite_1_net( TRACK* pt_start_conn, TRACK* pt_end_conn ) /***************************************************************************/ @@ -421,21 +419,18 @@ static void calcule_connexite_1_net( TRACK* pt_start_conn, TRACK* pt_end_conn ) } } - zflg = false; - if( Track->start == NULL ) // end track not already connected, search a connection { - Track->start = Locate_Piste_Connectee( Track, pt_start_conn /*Track*/, pt_end_conn, START ); + Track->start = Locate_Piste_Connectee( Track, Track, pt_end_conn, START ); } if( Track->end == NULL ) // end track not already connected, search a connection { - Track->end = Locate_Piste_Connectee( Track, pt_start_conn/*Track*/, pt_end_conn, END ); + Track->end = Locate_Piste_Connectee( Track, Track, pt_end_conn, END ); } if( Track == pt_end_conn ) break; } - zflg = false; /* Generation des sous equipots du net */ propage_equipot( pt_start_conn, pt_end_conn ); diff --git a/pcbnew/locate.cpp b/pcbnew/locate.cpp index f71e07b6fa..5b259f51c5 100644 --- a/pcbnew/locate.cpp +++ b/pcbnew/locate.cpp @@ -669,21 +669,20 @@ inline bool IsPointsAreNear(wxPoint & p1, wxPoint & p2, int max_dist) /******************************************************************/ /* return true if the dist between p1 and p2 < max_dist -Currently in test (currently rasnest algos work only if p1 == p2 +Currently in test (currently rasnest algos work only if p1 == p2) */ { -extern bool zflg; -if (zflg == true) -{ +#if 0 // Do not change it: does not work +{ int dist; dist = abs(p1.x - p2.x) + abs (p1.y - p2.y); dist *= 7; dist /= 10; if ( dist < max_dist ) return true; } -else +#else if ( p1 == p2 ) return true; -//#endif +#endif return false; }