Commit 1f0b61b1 authored by Dennis Nienhüser's avatar Dennis Nienhüser

Fix a regression introduced in 6ee45333.

Fixes texture layer not appearing after activation when the startup
map theme has no texture layers enabled by default and no other map
theme with texture layers enabled was active before.
parent b012ea1a
......@@ -396,7 +396,7 @@ void TextureLayer::setShowTileId( bool show )
void TextureLayer::setProjection( Projection projection )
{
if ( d->m_textures.isEmpty() || textureLayerCount() == 0 ) {
if ( d->m_textures.isEmpty() ) {
return;
}
......@@ -411,7 +411,7 @@ void TextureLayer::setProjection( Projection projection )
d->m_texmapper = new EquirectScanlineTextureMapper( &d->m_tileLoader );
break;
case Mercator:
if ( d->m_tileLoader.tileProjection() == GeoSceneTileDataset::Mercator ) {
if ( d->m_textures.at(0)->projection() == GeoSceneTileDataset::Mercator ) {
d->m_texmapper = new TileScalingTextureMapper( &d->m_tileLoader );
} else {
d->m_texmapper = new MercatorScanlineTextureMapper( &d->m_tileLoader );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment