Loading pcbnew/block.cpp +10 −25 Original line number Diff line number Diff line Loading @@ -573,14 +573,7 @@ void WinEDA_BasePcbFrame::Block_Delete( wxDC* DC ) } DrawPanel->Refresh( TRUE ); if( g_Show_Ratsnest ) Compile_Ratsnest( DC, TRUE ); else { m_Pcb->m_Status_Pcb = 0; /* we need (later) a full ratnest computation */ m_Pcb->Build_Pads_Full_List(); } } Loading Loading @@ -740,7 +733,6 @@ void WinEDA_BasePcbFrame::Block_Rotate( wxDC* DC ) } DrawPanel->Refresh( TRUE ); if( g_Show_Ratsnest ) Compile_Ratsnest( DC, TRUE ); } Loading Loading @@ -928,7 +920,6 @@ void WinEDA_BasePcbFrame::Block_Invert( wxDC* DC ) } DrawPanel->Refresh( TRUE ); if( g_Show_Ratsnest ) Compile_Ratsnest( DC, TRUE ); } Loading Loading @@ -1074,7 +1065,6 @@ void WinEDA_BasePcbFrame::Block_Move( wxDC* DC ) } DrawPanel->Refresh( TRUE ); if( g_Show_Ratsnest ) Compile_Ratsnest( DC, TRUE ); } Loading Loading @@ -1125,7 +1115,7 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) m_Pcb->m_Modules.PushFront( new_module ); GetScreen()->m_Curseur = module->m_Pos + MoveVector; Place_Module( new_module, DC ); Place_Module( new_module, NULL ); } GetScreen()->m_Curseur = oldpos; Loading @@ -1150,8 +1140,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) new_track->m_Start += MoveVector; new_track->m_End += MoveVector; new_track->Draw( DrawPanel, DC, GR_OR ); // reaffichage } track = next_track; } Loading @@ -1170,8 +1158,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) new_segzone->m_Start += MoveVector; new_segzone->m_End += MoveVector; new_segzone->Draw( DrawPanel, DC, GR_OR ); } } Loading @@ -1185,7 +1171,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) new_zone->m_TimeStamp = GetTimeStamp(); new_zone->Move( MoveVector ); m_Pcb->Add(new_zone); new_zone->Draw( DrawPanel, DC, GR_OR ); } } } Loading Loading @@ -1217,7 +1202,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) new_drawsegment->m_Start += MoveVector; new_drawsegment->m_End += MoveVector; new_drawsegment->Draw( DrawPanel, DC, GR_OR ); } break; Loading @@ -1237,7 +1221,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) /* Redessin du Texte */ new_pcbtext->m_Pos += MoveVector; new_pcbtext->Draw( DrawPanel, DC, GR_OR ); } break; Loading @@ -1256,7 +1239,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) m_Pcb->Add( new_mire ); new_mire->m_Pos += MoveVector; new_mire->Draw( DrawPanel, DC, GR_OR ); } break; Loading @@ -1275,7 +1257,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) m_Pcb->Add( new_cotation ); new_cotation->Move( MoveVector ); new_cotation->Draw( DrawPanel, DC, GR_OR ); } break; Loading @@ -1283,4 +1264,8 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) break; } } DrawPanel->Refresh( TRUE ); Compile_Ratsnest( DC, TRUE ); } pcbnew/class_board.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,9 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, int aControl ) else m_Modules.PushFront( (MODULE*) aBoardItem ); aBoardItem->SetParent( this ); // Because the list of pads has changed, reset the status // This indicate the list of pad and nets must be recalculated before use m_Status_Pcb = 0; break; case TYPE_COTATION: Loading pcbnew/class_netinfo.h +14 −11 Original line number Diff line number Diff line Loading @@ -14,6 +14,15 @@ class NETINFO_ITEM; /* Class RATSNEST_ITEM: describes a ratsnest line: a straight line connecting 2 pads */ /*****************************/ /* flags for a RATSNEST_ITEM */ /*****************************/ #define CH_VISIBLE 1 /* affichage permanent demande */ #define CH_UNROUTABLE 2 /* non route par l'autorouteur */ #define CH_ROUTE_REQ 4 /* doit etre route par l'autorouteur */ #define CH_ACTIF 8 /* chevelu non encore rout */ #define LOCAL_RATSNEST_ITEM 0x8000 /* indique un chevelu reliant 2 pins d'un meme * module pour le calcul des chevelus relatifs a 1 seul module */ class RATSNEST_ITEM { Loading @@ -21,10 +30,13 @@ private: int m_NetCode; // netcode ( = 1.. n , 0 is the value used for not connected items) public: int m_Status; // etat: voir defines prcdents (CH_ ...) int m_Status; // State: see previous defines (CH_ ...) D_PAD* m_PadStart; // pointer to the starting pad D_PAD* m_PadEnd; // pointer to ending pad int m_Lenght; // lenght of the line int m_Lenght; // lenght of the line (temporary used in some calculations) /* constructor */ RATSNEST_ITEM(); /** * Function GetNet Loading Loading @@ -176,15 +188,6 @@ public: }; /*****************************/ /* flags for a RATSNEST_ITEM */ /*****************************/ #define CH_VISIBLE 1 /* affichage permanent demande */ #define CH_UNROUTABLE 2 /* non route par l'autorouteur */ #define CH_ROUTE_REQ 4 /* doit etre route par l'autorouteur */ #define CH_ACTIF 8 /* chevelu non encore rout */ #define LOCAL_RATSNEST_ITEM 0x8000 /* indique un chevelu reliant 2 pins d'un meme * module pour le calcul des chevelus relatifs a 1 seul module */ /****************************************************************/ Loading pcbnew/class_netinfo_item.cpp +24 −13 Original line number Diff line number Diff line Loading @@ -31,10 +31,10 @@ NETINFO_ITEM::~NETINFO_ITEM() } /*********************************************************/ int NETINFO_ITEM:: ReadDescr( FILE* File, int* LineNum ) /*********************************************************/ /* Routine de lecture de 1 descr Equipotentielle. * retourne 0 si OK * 1 si lecture incomplete Loading Loading @@ -73,6 +73,7 @@ int NETINFO_ITEM:: ReadDescr( FILE* File, int* LineNum ) /**************************************/ bool NETINFO_ITEM::Save( FILE* aFile ) const /**************************************/ /** Note: the old name of class NETINFO_ITEM was EQUIPOT * so in Save (and read) functions, for compatibility, we use EQUIPOT as keyword */ Loading @@ -95,6 +96,7 @@ out: return success; } /** * Function SetNetname * @param const wxString : the new netname Loading Loading @@ -174,6 +176,16 @@ void NETINFO_ITEM::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const /* class RATSNEST_ITEM */ /***********************/ RATSNEST_ITEM::RATSNEST_ITEM() { m_NetCode = 0; // netcode ( = 1.. n , 0 is the value used for not connected items) m_Status = 0; // state m_PadStart = NULL; // pointer to the starting pad m_PadEnd = NULL; // pointer to ending pad m_Lenght = 0; // lenght of the line (temporary used in some calculations) } /** function Draw * Draws a line (a ratsnest) from the starting pad to the ending pad */ Loading @@ -182,4 +194,3 @@ void RATSNEST_ITEM::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, cons GRLine( &panel->m_ClipBox, DC, m_PadStart->m_Pos - aOffset, m_PadEnd->m_Pos - aOffset, 0, g_DesignSettings.m_RatsnestColor ); } pcbnew/class_netinfolist.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -92,9 +92,9 @@ void NETINFO_LIST::BuildListOfNets() /* Build the PAD list, sorted by net */ m_Parent->Build_Pads_Full_List(); int netcode = 0; /* Build netnames list, and create a netcode for each netname */ D_PAD* last_pad = NULL; int netcode = 0; for( unsigned ii = 0; ii < m_Parent->m_Pads.size(); ii++ ) { pad = m_Parent->m_Pads[ii]; Loading Loading
pcbnew/block.cpp +10 −25 Original line number Diff line number Diff line Loading @@ -573,14 +573,7 @@ void WinEDA_BasePcbFrame::Block_Delete( wxDC* DC ) } DrawPanel->Refresh( TRUE ); if( g_Show_Ratsnest ) Compile_Ratsnest( DC, TRUE ); else { m_Pcb->m_Status_Pcb = 0; /* we need (later) a full ratnest computation */ m_Pcb->Build_Pads_Full_List(); } } Loading Loading @@ -740,7 +733,6 @@ void WinEDA_BasePcbFrame::Block_Rotate( wxDC* DC ) } DrawPanel->Refresh( TRUE ); if( g_Show_Ratsnest ) Compile_Ratsnest( DC, TRUE ); } Loading Loading @@ -928,7 +920,6 @@ void WinEDA_BasePcbFrame::Block_Invert( wxDC* DC ) } DrawPanel->Refresh( TRUE ); if( g_Show_Ratsnest ) Compile_Ratsnest( DC, TRUE ); } Loading Loading @@ -1074,7 +1065,6 @@ void WinEDA_BasePcbFrame::Block_Move( wxDC* DC ) } DrawPanel->Refresh( TRUE ); if( g_Show_Ratsnest ) Compile_Ratsnest( DC, TRUE ); } Loading Loading @@ -1125,7 +1115,7 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) m_Pcb->m_Modules.PushFront( new_module ); GetScreen()->m_Curseur = module->m_Pos + MoveVector; Place_Module( new_module, DC ); Place_Module( new_module, NULL ); } GetScreen()->m_Curseur = oldpos; Loading @@ -1150,8 +1140,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) new_track->m_Start += MoveVector; new_track->m_End += MoveVector; new_track->Draw( DrawPanel, DC, GR_OR ); // reaffichage } track = next_track; } Loading @@ -1170,8 +1158,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) new_segzone->m_Start += MoveVector; new_segzone->m_End += MoveVector; new_segzone->Draw( DrawPanel, DC, GR_OR ); } } Loading @@ -1185,7 +1171,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) new_zone->m_TimeStamp = GetTimeStamp(); new_zone->Move( MoveVector ); m_Pcb->Add(new_zone); new_zone->Draw( DrawPanel, DC, GR_OR ); } } } Loading Loading @@ -1217,7 +1202,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) new_drawsegment->m_Start += MoveVector; new_drawsegment->m_End += MoveVector; new_drawsegment->Draw( DrawPanel, DC, GR_OR ); } break; Loading @@ -1237,7 +1221,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) /* Redessin du Texte */ new_pcbtext->m_Pos += MoveVector; new_pcbtext->Draw( DrawPanel, DC, GR_OR ); } break; Loading @@ -1256,7 +1239,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) m_Pcb->Add( new_mire ); new_mire->m_Pos += MoveVector; new_mire->Draw( DrawPanel, DC, GR_OR ); } break; Loading @@ -1275,7 +1257,6 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) m_Pcb->Add( new_cotation ); new_cotation->Move( MoveVector ); new_cotation->Draw( DrawPanel, DC, GR_OR ); } break; Loading @@ -1283,4 +1264,8 @@ void WinEDA_BasePcbFrame::Block_Duplicate( wxDC* DC ) break; } } DrawPanel->Refresh( TRUE ); Compile_Ratsnest( DC, TRUE ); }
pcbnew/class_board.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,9 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, int aControl ) else m_Modules.PushFront( (MODULE*) aBoardItem ); aBoardItem->SetParent( this ); // Because the list of pads has changed, reset the status // This indicate the list of pad and nets must be recalculated before use m_Status_Pcb = 0; break; case TYPE_COTATION: Loading
pcbnew/class_netinfo.h +14 −11 Original line number Diff line number Diff line Loading @@ -14,6 +14,15 @@ class NETINFO_ITEM; /* Class RATSNEST_ITEM: describes a ratsnest line: a straight line connecting 2 pads */ /*****************************/ /* flags for a RATSNEST_ITEM */ /*****************************/ #define CH_VISIBLE 1 /* affichage permanent demande */ #define CH_UNROUTABLE 2 /* non route par l'autorouteur */ #define CH_ROUTE_REQ 4 /* doit etre route par l'autorouteur */ #define CH_ACTIF 8 /* chevelu non encore rout */ #define LOCAL_RATSNEST_ITEM 0x8000 /* indique un chevelu reliant 2 pins d'un meme * module pour le calcul des chevelus relatifs a 1 seul module */ class RATSNEST_ITEM { Loading @@ -21,10 +30,13 @@ private: int m_NetCode; // netcode ( = 1.. n , 0 is the value used for not connected items) public: int m_Status; // etat: voir defines prcdents (CH_ ...) int m_Status; // State: see previous defines (CH_ ...) D_PAD* m_PadStart; // pointer to the starting pad D_PAD* m_PadEnd; // pointer to ending pad int m_Lenght; // lenght of the line int m_Lenght; // lenght of the line (temporary used in some calculations) /* constructor */ RATSNEST_ITEM(); /** * Function GetNet Loading Loading @@ -176,15 +188,6 @@ public: }; /*****************************/ /* flags for a RATSNEST_ITEM */ /*****************************/ #define CH_VISIBLE 1 /* affichage permanent demande */ #define CH_UNROUTABLE 2 /* non route par l'autorouteur */ #define CH_ROUTE_REQ 4 /* doit etre route par l'autorouteur */ #define CH_ACTIF 8 /* chevelu non encore rout */ #define LOCAL_RATSNEST_ITEM 0x8000 /* indique un chevelu reliant 2 pins d'un meme * module pour le calcul des chevelus relatifs a 1 seul module */ /****************************************************************/ Loading
pcbnew/class_netinfo_item.cpp +24 −13 Original line number Diff line number Diff line Loading @@ -31,10 +31,10 @@ NETINFO_ITEM::~NETINFO_ITEM() } /*********************************************************/ int NETINFO_ITEM:: ReadDescr( FILE* File, int* LineNum ) /*********************************************************/ /* Routine de lecture de 1 descr Equipotentielle. * retourne 0 si OK * 1 si lecture incomplete Loading Loading @@ -73,6 +73,7 @@ int NETINFO_ITEM:: ReadDescr( FILE* File, int* LineNum ) /**************************************/ bool NETINFO_ITEM::Save( FILE* aFile ) const /**************************************/ /** Note: the old name of class NETINFO_ITEM was EQUIPOT * so in Save (and read) functions, for compatibility, we use EQUIPOT as keyword */ Loading @@ -95,6 +96,7 @@ out: return success; } /** * Function SetNetname * @param const wxString : the new netname Loading Loading @@ -174,6 +176,16 @@ void NETINFO_ITEM::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const /* class RATSNEST_ITEM */ /***********************/ RATSNEST_ITEM::RATSNEST_ITEM() { m_NetCode = 0; // netcode ( = 1.. n , 0 is the value used for not connected items) m_Status = 0; // state m_PadStart = NULL; // pointer to the starting pad m_PadEnd = NULL; // pointer to ending pad m_Lenght = 0; // lenght of the line (temporary used in some calculations) } /** function Draw * Draws a line (a ratsnest) from the starting pad to the ending pad */ Loading @@ -182,4 +194,3 @@ void RATSNEST_ITEM::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, cons GRLine( &panel->m_ClipBox, DC, m_PadStart->m_Pos - aOffset, m_PadEnd->m_Pos - aOffset, 0, g_DesignSettings.m_RatsnestColor ); }
pcbnew/class_netinfolist.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -92,9 +92,9 @@ void NETINFO_LIST::BuildListOfNets() /* Build the PAD list, sorted by net */ m_Parent->Build_Pads_Full_List(); int netcode = 0; /* Build netnames list, and create a netcode for each netname */ D_PAD* last_pad = NULL; int netcode = 0; for( unsigned ii = 0; ii < m_Parent->m_Pads.size(); ii++ ) { pad = m_Parent->m_Pads[ii]; Loading