Update patches: fastmercator is checked in now, globe projection rangecheck is new
[marble] / packaging / debian / patches / globe-projection-rangecheck.diff
1 Index: marble-1.0.0/src/lib/AbstractScanlineTextureMapper.cpp
2 ===================================================================
3 --- marble-1.0.0.orig/src/lib/AbstractScanlineTextureMapper.cpp 2011-01-21 19:56:08.000000000 +0100
4 +++ marble-1.0.0/src/lib/AbstractScanlineTextureMapper.cpp      2011-01-21 19:59:23.000000000 +0100
5 @@ -231,8 +231,8 @@
6                      nextTile( posX, posY );
7                      itLon = m_prevLon + m_toTileCoordinatesLon;
8                      itLat = m_prevLat + m_toTileCoordinatesLat;
9 -                    posX = itLon + itStepLon * j;
10 -                    posY = itLat + itStepLat * j;
11 +                    posX = qMax<qreal>( 0.0, qMin<qreal>( tileWidth-1.0, itLon + itStepLon * j ) );
12 +                    posY = qMax<qreal>( 0.0, qMin<qreal>( tileHeight-1.0, itLat + itStepLat * j ) );
13                      oldPosX = -1;
14                  }
15