Fixed tracks of 0 width causing division by 0 error.

This commit is contained in:
Maciej Suminski 2014-02-03 13:05:27 +01:00
parent 15bfac3f4e
commit 44861f5889
1 changed files with 2 additions and 2 deletions

View File

@ -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