[Marble-commits] KDE/kdeedu/marble/src/lib

Bernhard Beschow bbeschow at cs.tu-berlin.de
Fri Jul 30 19:05:54 CEST 2010


SVN commit 1157316 by beschow:

assert that a texture mapper actually gets a texture

 M  +2 -3      AbstractScanlineTextureMapper.cpp  
 M  +1 -2      AbstractScanlineTextureMapper.h  


--- trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.cpp #1157315:1157316
@@ -48,10 +48,9 @@
       m_globalHeight( 0 ),
       m_normGlobalWidth( 0.0 ),
       m_normGlobalHeight( 0.0 ),
-      m_mapThemeIdHash( textureLayer ? qHash( textureLayer->sourceDir() ) : 0 )
+      m_mapThemeIdHash( qHash( textureLayer->sourceDir() ) )
 {
-    m_tileProjection = textureLayer ? textureLayer->projection()
-        : GeoSceneTexture::Equirectangular;
+    Q_ASSERT( textureLayer );  // just for documentation
 
     connect( m_tileLoader, SIGNAL( tileUpdateAvailable() ), 
              this,         SLOT( notifyMapChanged() ) );
--- trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.h #1157315:1157316
@@ -132,7 +132,6 @@
     GeoSceneTexture const * const m_textureLayer;
     /// size of the tiles of of the current texture layer
     QSize const m_tileSize;
-    GeoSceneTexture::Projection m_tileProjection;
     StackedTile *m_tile;
     int         m_previousRadius;
 
@@ -179,7 +178,7 @@
 
 inline qreal AbstractScanlineTextureMapper::rad2PixelY( qreal lat ) const
 {
-    switch ( m_tileProjection ) {
+    switch ( m_textureLayer->projection() ) {
     case GeoSceneTexture::Equirectangular:
         return -lat * m_normGlobalHeight;
     case GeoSceneTexture::Mercator:


More information about the Marble-commits mailing list