Fixed tracks of 0 width causing division by 0 error.
This commit is contained in:
parent
15bfac3f4e
commit
44861f5889
|
@ -763,9 +763,9 @@ void TRACK::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
unsigned int TRACK::ViewGetLOD( int aLayer ) const
|
||||
{
|
||||
// Netnames will be shown only if zoom is appropriate
|
||||
if( aLayer == GetNetnameLayer( GetLayer() ) )
|
||||
if( aLayer == ITEM_GAL_LAYER( TRACK_NETNAMES_VISIBLE ) )
|
||||
{
|
||||
return ( 20000000 / m_Width );
|
||||
return ( 20000000 / ( m_Width + 1 ) );
|
||||
}
|
||||
|
||||
// Other layers are shown without any conditions
|
||||
|
|
Loading…
Reference in New Issue