From b4f02306587db4c14bcc2d91431c80e19dfed6bf Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 12 Dec 2012 12:57:17 +0100 Subject: [PATCH] Pcbnew: fix Bug #1089120. Also change "Length Die" expression to "Length Pad To Die" in code --- pcbnew/CMakeLists.txt | 1 - pcbnew/class_board.cpp | 24 ++++++++---------- pcbnew/class_board.h | 8 +++--- pcbnew/class_module.cpp | 4 +-- pcbnew/class_netinfo_item.cpp | 10 ++++---- pcbnew/class_pad.cpp | 10 ++++---- pcbnew/class_pad.h | 6 ++--- pcbnew/class_track.cpp | 14 +++++------ pcbnew/dialogs/dialog_pad_properties.cpp | 10 ++++---- pcbnew/dialogs/dialog_pad_properties_base.cpp | 6 ++--- pcbnew/dialogs/dialog_pad_properties_base.fbp | 6 ++--- pcbnew/dialogs/dialog_pad_properties_base.h | 2 +- pcbnew/editrack.cpp | 10 ++++---- pcbnew/kicad_plugin.cpp | 4 +-- pcbnew/legacy_plugin.cpp | 6 ++--- pcbnew/pcb_parser.cpp | 2 +- pcbnew/tr_modif.cpp | 10 ++++++++ pcbnew/trpiste.cpp | 25 ------------------- 18 files changed, 70 insertions(+), 88 deletions(-) delete mode 100644 pcbnew/trpiste.cpp diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 02814ff9e7..8f2f1beb89 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -207,7 +207,6 @@ set(PCBNEW_CLASS_SRCS toolbars_update_user_interface.cpp tracepcb.cpp tr_modif.cpp - trpiste.cpp xchgmod.cpp zones_convert_brd_items_to_polygons_with_Boost.cpp zones_convert_to_polygons_aux_functions.cpp diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 87d56dc5dc..a8630aea4c 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1822,11 +1822,9 @@ TRACK* BOARD::GetTrace( TRACK* aTrace, const wxPoint& aPosition, int aLayerMask } -TRACK* BOARD::MarkTrace( TRACK* aTrace, - int* aCount, - int* aTraceLength, - int* aDieLength, - bool aReorder ) +TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount, + double* aTraceLength, double* aPadToDieLength, + bool aReorder ) { int NbSegmBusy; @@ -1976,7 +1974,7 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, return NULL; double full_len = 0; - double lenDie = 0; + double lenPadToDie = 0; if( aReorder ) { @@ -2002,20 +2000,20 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, if( aTraceLength ) full_len += track->GetLength(); - if( aDieLength ) // Add now length die. + if( aPadToDieLength ) // Add now length die. { // In fact only 2 pads (maximum) will be taken in account: // that are on each end of the track, if any if( track->GetState( BEGIN_ONPAD ) ) { D_PAD * pad = (D_PAD *) track->start; - lenDie += (double) pad->GetDieLength(); + lenPadToDie += (double) pad->GetPadToDieLength(); } if( track->GetState( END_ONPAD ) ) { D_PAD * pad = (D_PAD *) track->end; - lenDie += (double) pad->GetDieLength(); + lenPadToDie += (double) pad->GetPadToDieLength(); } } } @@ -2039,13 +2037,13 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, if( track->GetState( BEGIN_ONPAD ) ) { D_PAD * pad = (D_PAD *) track->start; - lenDie += (double) pad->GetDieLength(); + lenPadToDie += (double) pad->GetPadToDieLength(); } if( track->GetState( END_ONPAD ) ) { D_PAD * pad = (D_PAD *) track->end; - lenDie += (double) pad->GetDieLength(); + lenPadToDie += (double) pad->GetPadToDieLength(); } } } @@ -2054,8 +2052,8 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, if( aTraceLength ) *aTraceLength = KiROUND( full_len ); - if( aDieLength ) - *aDieLength = KiROUND( lenDie ); + if( aPadToDieLength ) + *aPadToDieLength = KiROUND( lenPadToDie ); if( aCount ) *aCount = NbSegmBusy; diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index fcbab40978..faf41e7dde 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -1252,9 +1252,9 @@ public: * @param aTrace The segment within a list of trace segments to test. * @param aCount A pointer to an integer where to return the number of * marked segments. - * @param aTraceLength A pointer to an integer where to return the length of the + * @param aTraceLength A pointer to an double where to return the length of the * trace. - * @param aDieLength A pointer to an integer where to return the extra lengths inside + * @param aInPackageLength A pointer to an double where to return the extra lengths inside * integrated circuits from the pads connected to this track to the * die (if any). * @param aReorder true for reorder the interesting segments (useful for @@ -1264,8 +1264,8 @@ public: * track length in this case, flags are reset * @return TRACK* The first in the chain of interesting segments. */ - TRACK* MarkTrace( TRACK* aTrace, int* aCount, int* aTraceLength, - int* aDieLength, bool aReorder ); + TRACK* MarkTrace( TRACK* aTrace, int* aCount, double* aTraceLength, + double* aInPackageLength, bool aReorder ); /** * Function GetFootprint diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 1567d859e0..8ce708222d 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -724,8 +724,8 @@ bool MODULE::IsLibNameValid( const wxString & aName ) */ const wxChar* MODULE::ReturnStringLibNameInvalidChars( bool aUserReadable ) { - static const wxChar invalidChars[] = wxT("\t \"\\/"); - static const wxChar invalidCharsReadable[] = wxT("'tab' 'space' \\ \" /"); + static const wxChar invalidChars[] = wxT("%$\t \"\\/"); + static const wxChar invalidCharsReadable[] = wxT("% $ 'tab' 'space' \\ \" /"); if( aUserReadable ) return invalidCharsReadable; diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index c850ddf6e4..812a500701 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -111,7 +111,7 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) MODULE* module; D_PAD* pad; double lengthnet = 0; // This is the lenght of tracks on pcb - double lengthdie = 0; // this is the lenght of internal ICs connections + double lengthPadToDie = 0; // this is the lenght of internal ICs connections frame->ClearMsgPanel(); @@ -129,7 +129,7 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) if( pad->GetNet() == GetNet() ) { count++; - lengthdie += pad->GetDieLength(); + lengthPadToDie += pad->GetPadToDieLength(); } } } @@ -159,7 +159,7 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) frame->AppendMsgPanel( _( "Vias" ), txt, BLUE ); // Displays the full net lenght (tracks on pcb + internal ICs connections ): - txt = frame->CoordinateToString( lengthnet + lengthdie ); + txt = frame->CoordinateToString( lengthnet + lengthPadToDie ); frame->AppendMsgPanel( _( "Net Length:" ), txt, RED ); // Displays the net lenght of tracks only: @@ -167,8 +167,8 @@ void NETINFO_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame ) frame->AppendMsgPanel( _( "On Board" ), txt, RED ); // Displays the net lenght of internal ICs connections (wires inside ICs): - txt = frame->CoordinateToString( lengthdie ); - frame->AppendMsgPanel( _( "On Die" ), txt, RED ); + txt = frame->CoordinateToString( lengthPadToDie ); + frame->AppendMsgPanel( _( "In Package" ), txt, RED ); } diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index db4a4c692c..c1ea8728d9 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -58,7 +58,7 @@ D_PAD::D_PAD( MODULE* parent ) : m_Size.x = m_Size.y = 500; // give it a reasonable size m_Orient = 0; // Pad rotation in 1/10 degrees - m_LengthDie = 0; + m_LengthPadToDie = 0; if( m_Parent && m_Parent->Type() == PCB_MODULE_T ) { @@ -313,7 +313,7 @@ void D_PAD::Copy( D_PAD* source ) m_PadShape = source->m_PadShape; m_Attribute = source->m_Attribute; m_Orient = source->m_Orient; - m_LengthDie = source->m_LengthDie; + m_LengthPadToDie = source->m_LengthPadToDie; m_LocalClearance = source->m_LocalClearance; m_LocalSolderMaskMargin = source->m_LocalSolderMaskMargin; m_LocalSolderPasteMargin = source->m_LocalSolderPasteMargin; @@ -662,10 +662,10 @@ void D_PAD::DisplayInfo( EDA_DRAW_FRAME* frame ) Line = frame->CoordinateToString( m_Pos.y ); frame->AppendMsgPanel( _( "Y pos" ), Line, LIGHTBLUE ); - if( GetDieLength() ) + if( GetPadToDieLength() ) { - Line = frame->CoordinateToString( GetDieLength() ); - frame->AppendMsgPanel( _( "Length on die" ), Line, CYAN ); + Line = frame->CoordinateToString( GetPadToDieLength() ); + frame->AppendMsgPanel( _( "Length in package" ), Line, CYAN ); } } diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 1ba650471e..644a48abba 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -190,8 +190,8 @@ public: void SetAttribute( PAD_ATTR_T aAttribute ) { m_Attribute = aAttribute; } PAD_ATTR_T GetAttribute() const { return m_Attribute; } - void SetDieLength( int aLength ) { m_LengthDie = aLength; } - int GetDieLength() const { return m_LengthDie; } + void SetPadToDieLength( int aLength ) { m_LengthPadToDie = aLength; } + int GetPadToDieLength() const { return m_LengthPadToDie; } int GetLocalSolderMaskMargin() const { return m_LocalSolderMaskMargin; } void SetLocalSolderMaskMargin( int aMargin ) { m_LocalSolderMaskMargin = aMargin; } @@ -464,7 +464,7 @@ private: PAD_ATTR_T m_Attribute; ///< NORMAL, PAD_SMD, PAD_CONN, PAD_HOLE_NOT_PLATED double m_Orient; ///< in 1/10 degrees - int m_LengthDie; ///< Length net from pad to die on chip + int m_LengthPadToDie; ///< Length net from pad to die, inside the package /// Local clearance. When null, the module default value is used. /// when the module default value is null, the netclass value is used diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 2dd7f14d3c..c902787c61 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -968,19 +968,19 @@ void TRACK::DisplayInfo( EDA_DRAW_FRAME* frame ) // Display full track length (in Pcbnew) if( frame->IsType( PCB_FRAME_TYPE ) ) { - int trackLen = 0; - int lenDie = 0; - board->MarkTrace( this, NULL, &trackLen, &lenDie, false ); + double trackLen = 0; + double lenPadToDie = 0; + board->MarkTrace( this, NULL, &trackLen, &lenPadToDie, false ); msg = frame->CoordinateToString( trackLen ); frame->AppendMsgPanel( _( "Track Len" ), msg, DARKCYAN ); - if( lenDie != 0 ) + if( lenPadToDie != 0 ) { - msg = frame->CoordinateToString( trackLen + lenDie ); + msg = frame->LengthDoubleToString( trackLen + lenPadToDie ); frame->AppendMsgPanel( _( "Full Len" ), msg, DARKCYAN ); - msg = frame->CoordinateToString( lenDie ); - frame->AppendMsgPanel( _( "On Die" ), msg, DARKCYAN ); + msg = frame->LengthDoubleToString( lenPadToDie ); + frame->AppendMsgPanel( _( "In Package" ), msg, DARKCYAN ); } } diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 7b99ded6c8..6ad3813afa 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -342,7 +342,7 @@ void DIALOG_PAD_PROPERTIES::initValues() m_trapDeltaDirChoice->SetSelection( 1 ); } - PutValueInLocalUnits( *m_LengthDieCtrl, m_dummyPad->GetDieLength() ); + PutValueInLocalUnits( *m_LengthPadToDieCtrl, m_dummyPad->GetPadToDieLength() ); PutValueInLocalUnits( *m_NetClearanceValueCtrl, m_dummyPad->GetLocalClearance() ); PutValueInLocalUnits( *m_SolderMaskMarginCtrl, m_dummyPad->GetLocalSolderMaskMargin() ); @@ -468,7 +468,7 @@ void DIALOG_PAD_PROPERTIES::initValues() m_PadNumCtrl->Enable( enable ); m_PadNetNameCtrl->Enable( enable ); - m_LengthDieCtrl->Enable( enable ); + m_LengthPadToDieCtrl->Enable( enable ); if( m_dummyPad->GetDrillShape() != PAD_OVAL ) m_DrillShapeCtrl->SetSelection( 0 ); @@ -612,7 +612,7 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event ) bool enable = ii != 3; m_PadNumCtrl->Enable( enable ); m_PadNetNameCtrl->Enable( enable ); - m_LengthDieCtrl->Enable( enable ); + m_LengthPadToDieCtrl->Enable( enable ); } @@ -788,7 +788,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event ) offset.y *= isign; m_CurrentPad->SetOffset( offset ); - m_CurrentPad->SetDieLength( m_Pad_Master.GetDieLength() ); + m_CurrentPad->SetPadToDieLength( m_Pad_Master.GetPadToDieLength() ); if( m_CurrentPad->GetLayerMask() != m_Pad_Master.GetLayerMask() ) { @@ -925,7 +925,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) aPad->SetSize( wxSize( x, y ) ); // Read pad length die - aPad->SetDieLength( ReturnValueFromTextCtrl( *m_LengthDieCtrl ) ); + aPad->SetPadToDieLength( ReturnValueFromTextCtrl( *m_LengthPadToDieCtrl ) ); // Read pad shape delta size: // m_DeltaSize.x or m_DeltaSize.y must be NULL. for a trapezoid. diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp index 147cc1444d..a6517ccbc6 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp @@ -170,14 +170,14 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_PadShapeOffsetY_Unit->Wrap( -1 ); fgSizerShapeType->Add( m_PadShapeOffsetY_Unit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_staticText38 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Die length:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText38 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad to die length:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText38->Wrap( -1 ); m_staticText38->SetToolTip( _("Wire length from pad to die on chip ( used to calculate actual track length)") ); fgSizerShapeType->Add( m_staticText38, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - m_LengthDieCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerShapeType->Add( m_LengthDieCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + m_LengthPadToDieCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_LengthPadToDieCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_PadLengthDie_Unit = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadLengthDie_Unit->Wrap( -1 ); diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp index 2ab9cb35ad..e57b6f7582 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp @@ -2167,7 +2167,7 @@ 1 Resizable - 0 + 4 1 @@ -3093,7 +3093,7 @@ 0 0 wxID_ANY - Die length: + Pad to die length: 0 @@ -3184,7 +3184,7 @@ 0 1 - m_LengthDieCtrl + m_LengthPadToDieCtrl 1 diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h index 9b31b150f4..610ab81dcf 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.h +++ b/pcbnew/dialogs/dialog_pad_properties_base.h @@ -83,7 +83,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxTextCtrl* m_ShapeOffset_Y_Ctrl; wxStaticText* m_PadShapeOffsetY_Unit; wxStaticText* m_staticText38; - wxTextCtrl* m_LengthDieCtrl; + wxTextCtrl* m_LengthPadToDieCtrl; wxStaticText* m_PadLengthDie_Unit; wxStaticText* m_staticText21; wxTextCtrl* m_ShapeDelta_Ctrl; diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index fcf40b3d53..b1b122ef12 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -791,14 +791,14 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo // Display current track length (on board) and the the actual track len // if there is an extra len due to the len die on the starting pad (if any) double trackLen = 0.0; - double lenDie = 0.0; + double lenPadToDie = 0.0; wxString msg; // If the starting point is on a pad, add current track length+ length die if( g_FirstTrackSegment->GetState( BEGIN_ONPAD ) ) { D_PAD * pad = (D_PAD *) g_FirstTrackSegment->start; - lenDie = (double) pad->GetDieLength(); + lenPadToDie = (double) pad->GetPadToDieLength(); } // calculate track len on board: @@ -808,11 +808,11 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo msg = frame->LengthDoubleToString( trackLen ); frame->AppendMsgPanel( _( "Track Len" ), msg, DARKCYAN ); - if( lenDie != 0 ) // display the track len on board and the actual track len + if( lenPadToDie != 0 ) // display the track len on board and the actual track len { frame->AppendMsgPanel( _( "Full Len" ), msg, DARKCYAN ); - msg = frame->LengthDoubleToString( trackLen+lenDie ); - frame->AppendMsgPanel( _( "On Die" ), msg, DARKCYAN ); + msg = frame->LengthDoubleToString( trackLen+lenPadToDie ); + frame->AppendMsgPanel( _( "Pad to die" ), msg, DARKCYAN ); } // Add current segments count (number of segments in this new track): diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 36859deb74..b1e085967a 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1127,9 +1127,9 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const aPad->GetNet(), m_out->Quotew( aPad->GetNetname() ).c_str() ); } - if( aPad->GetDieLength() != 0 ) + if( aPad->GetPadToDieLength() != 0 ) m_out->Print( aNestLevel+1, "(die_length %s)\n", - FMT_IU( aPad->GetDieLength() ).c_str() ); + FMT_IU( aPad->GetPadToDieLength() ).c_str() ); if( aPad->GetLocalSolderMaskMargin() != 0 ) m_out->Print( aNestLevel+1, "(solder_mask_margin %s)\n", diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index ca1407b456..97b84503a3 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1288,7 +1288,7 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule ) else if( TESTLINE( "Le" ) ) { BIU tmp = biuParse( line + SZ( "Le" ) ); - pad->SetDieLength( tmp ); + pad->SetPadToDieLength( tmp ); } else if( TESTLINE( ".SolderMask" ) ) @@ -3331,8 +3331,8 @@ void LEGACY_PLUGIN::savePAD( const D_PAD* me ) const fprintf( m_fp, "Po %s\n", fmtBIUPoint( me->GetPos0() ).c_str() ); - if( me->GetDieLength() != 0 ) - fprintf( m_fp, "Le %s\n", fmtBIU( me->GetDieLength() ).c_str() ); + if( me->GetPadToDieLength() != 0 ) + fprintf( m_fp, "Le %s\n", fmtBIU( me->GetPadToDieLength() ).c_str() ); if( me->GetLocalSolderMaskMargin() != 0 ) fprintf( m_fp, ".SolderMask %s\n", fmtBIU( me->GetLocalSolderMaskMargin() ).c_str() ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 8c5b4cd6e5..d20ad57de3 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2156,7 +2156,7 @@ D_PAD* PCB_PARSER::parseD_PAD() throw( IO_ERROR, PARSE_ERROR ) break; case T_die_length: - pad->SetDieLength( parseBoardUnits( T_die_length ) ); + pad->SetPadToDieLength( parseBoardUnits( T_die_length ) ); NeedRIGHT(); break; diff --git a/pcbnew/tr_modif.cpp b/pcbnew/tr_modif.cpp index 2bfa2e5725..afad102a6f 100644 --- a/pcbnew/tr_modif.cpp +++ b/pcbnew/tr_modif.cpp @@ -44,6 +44,16 @@ static void ListSetState( EDA_ITEM* Start, int NbItem, int State, int onoff ); +void DrawTraces( EDA_DRAW_PANEL* panel, wxDC* DC, TRACK* aTrackList, int nbsegment, + GR_DRAWMODE draw_mode ) +{ + // preserve the start of the list for debugging. + for( TRACK* track = aTrackList; nbsegment > 0 && track; nbsegment--, track = track->Next() ) + { + track->Draw( panel, DC, draw_mode ); + } +} + /* * This function try to remove an old track, when a new track is created, * and the old track is no more needed diff --git a/pcbnew/trpiste.cpp b/pcbnew/trpiste.cpp deleted file mode 100644 index 0cc96c1bb1..0000000000 --- a/pcbnew/trpiste.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file trpiste.cpp - * @brief Routine for plotting traces. - */ - -#include -#include -#include -#include - -#include - -#include -#include - - -void DrawTraces( EDA_DRAW_PANEL* panel, wxDC* DC, TRACK* aTrackList, int nbsegment, - GR_DRAWMODE draw_mode ) -{ - // preserve the start of the list for debugging. - for( TRACK* track = aTrackList; nbsegment > 0 && track; nbsegment--, track = track->Next() ) - { - track->Draw( panel, DC, draw_mode ); - } -}