Fix overflow in track len calculations and display (Bug #1347878).

This commit is contained in:
jean-pierre charras 2014-07-24 08:43:23 +02:00
parent c1f11a1bd1
commit 13b0784cd5
2 changed files with 3 additions and 3 deletions

View File

@ -1878,10 +1878,10 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount,
}
if( aTraceLength )
*aTraceLength = KiROUND( full_len );
*aTraceLength = full_len;
if( aPadToDieLength )
*aPadToDieLength = KiROUND( lenPadToDie );
*aPadToDieLength = lenPadToDie;
if( aCount )
*aCount = NbSegmBusy;

View File

@ -1002,7 +1002,7 @@ void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
double trackLen = 0;
double lenPadToDie = 0;
board->MarkTrace( this, NULL, &trackLen, &lenPadToDie, false );
msg = ::CoordinateToString( trackLen );
msg = ::LengthDoubleToString( trackLen );
aList.push_back( MSG_PANEL_ITEM( _( "Track Len" ), msg, DARKCYAN ) );
if( lenPadToDie != 0 )