[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.6/kdeedu/marble/src/lib
From:       Torsten Rahn <tackat () kde ! org>
Date:       2010-12-27 0:28:19
Message-ID: 20101227002819.D5A51AC8AD () svn ! kde ! org
[Download RAW message or body]

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 ) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic