[Marble-commits] KDE/kdeedu/marble/src/lib
Jens-Michael Hoffmann
jensmh at gmx.de
Sun Feb 21 19:02:38 CET 2010
SVN commit 1093907 by jmhoffmann:
StackedTileLoader: introduce helper method findSceneLayer.
M +9 -2 StackedTileLoader.cpp
M +1 -0 StackedTileLoader.h
--- trunk/KDE/kdeedu/marble/src/lib/StackedTileLoader.cpp #1093906:1093907
@@ -186,8 +186,7 @@
tile->setForMergedLayerDecorator();
d->m_tilesOnDisplay[ stackedTileId ] = tile;
- GeoSceneLayer const * const sceneLayer = d->m_sceneLayers.value( stackedTileId.mapThemeIdHash(), 0 );
- Q_ASSERT( sceneLayer );
+ GeoSceneLayer const * const sceneLayer = findSceneLayer( stackedTileId );
mDebug() << "scene layer:" << sceneLayer->name();
QVector<GeoSceneAbstractDataset*> textureLayers = sceneLayer->datasets();
@@ -325,6 +324,14 @@
emit tileUpdateAvailable();
}
+inline GeoSceneLayer const * StackedTileLoader::findSceneLayer( TileId const & stackedTileId ) const
+{
+ GeoSceneLayer const * const result = d->m_sceneLayers.value( stackedTileId.mapThemeIdHash(),
+ 0 );
+ Q_ASSERT( result );
+ return result;
+}
+
inline GeoSceneTexture const * StackedTileLoader::findTextureLayer( TileId const & id ) const
{
GeoSceneTexture const * const textureLayer = d->m_textureLayers.value( id.mapThemeIdHash(), 0 );
--- trunk/KDE/kdeedu/marble/src/lib/StackedTileLoader.h #1093906:1093907
@@ -155,6 +155,7 @@
private:
Q_DISABLE_COPY( StackedTileLoader )
+ GeoSceneLayer const * findSceneLayer( TileId const & ) const;
GeoSceneTexture const * findTextureLayer( TileId const & ) const;
GeoSceneTexture * findTextureLayer( TileId const & );
void initTextureLayers();
More information about the Marble-commits
mailing list