SVN commit 1209498 by rahn: Backport: rahn * r1209496 trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp - Fix a regression in MarbleMap::setMapThemeId which took the availability of texture layers for granted ... which is not the case for the plain map. M +15 -2 MarbleMap.cpp --- branches/KDE/4.6/kdeedu/marble/src/lib/MarbleMap.cpp #1209497:1209498 @@ -856,9 +856,13 @@ d->m_viewParams.setMapThemeId( mapThemeId ); GeoSceneDocument *mapTheme = d->m_viewParams.mapTheme(); + // NOTE due to frequent regressions: + // Do NOT take it for granted that there is any TEXTURE or VECTOR data AVAILABLE + // at this point. Some themes do NOT have either vector or texture data! + // Check whether there is a vector layer available: + if ( mapTheme->map()->hasVectorLayers() ) { // Set all the colors for the vector layers - if ( mapTheme->map()->hasVectorLayers() ) { d->m_veccomposer.setOceanColor( mapTheme->map()->backgroundColor() ); // Just as with textures, this is a workaround for DGML2 to @@ -893,8 +897,13 @@ } } + // NOTE due to frequent regressions: + // Do NOT take it for granted that there is any TEXTURE or VECTOR data AVAILABLE + // at this point. + + // Check whether there is a texture layer available: + if ( mapTheme && mapTheme->map()->hasTextureLayers() ) { d->m_textureLayer.setMapTheme( mapTheme ); - if ( mapTheme && mapTheme->map()->hasTextureLayers() ) { // If the tiles aren't already there, put up a progress dialog // while creating them. @@ -934,6 +943,10 @@ d->m_textureLayer.setupTextureMapper( d->m_viewParams.projection() ); } + // NOTE due to frequent regressions: + // Do NOT take it for granted that there is any TEXTURE or VECTOR data AVAILABLE + // at this point! + d->m_placemarkLayout.requestStyleReset(); if ( mapTheme ) {