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

List:       kde-commits
Subject:    KDE/kdeedu/marble/src/lib
From:       Bernhard Beschow <bbeschow () cs ! tu-berlin ! de>
Date:       2011-03-23 14:57:21
Message-ID: 20110323145721.EB0A8AC8C9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1225815 by beschow:

determine whether placemarks should be drawn within PlacenarkLayout::paintPlaceFolder() rather than in
MarbleMap::paintGround()

* considers other planets than just the earth
* have MarbleMap not deal with specifics of placemarks

 M  +0 -13     MarbleMap.cpp  
 M  +19 -15    PlacemarkLayout.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp #1225814:1225815
@@ -206,20 +206,7 @@
     }
 
     // Paint the GeoDataPlacemark layer
-    bool showPlaces = false;
-    bool showCities = false;
-    bool showTerrain = false;
-    bool showOtherPlaces = false;
-
-    m_viewParams.propertyValue( "places", showPlaces );
-    m_viewParams.propertyValue( "cities", showCities );
-    m_viewParams.propertyValue( "terrain", showTerrain );
-    m_viewParams.propertyValue( "otherplaces", showOtherPlaces );
-
-    if ( showPlaces || showCities || showTerrain || showOtherPlaces )
-    {
         m_placemarkLayout.paintPlaceFolder( &painter, &m_viewParams );
-    }
 
     renderPositions.clear();
     renderPositions << "HOVERS_ABOVE_SURFACE";
--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkLayout.cpp #1225814:1225815
@@ -195,6 +195,25 @@
 void PlacemarkLayout::paintPlaceFolder( QPainter   *painter,
                                         ViewParams *viewParams )
 {
+    // earth
+    bool showPlaces, showCities, showTerrain, showOtherPlaces;
+
+    viewParams->propertyValue( "places", showPlaces );
+    viewParams->propertyValue( "cities", showCities );
+    viewParams->propertyValue( "terrain", showTerrain );
+    viewParams->propertyValue( "otherplaces", showOtherPlaces );
+    
+    // other planets
+    bool showLandingSites, showCraters, showMaria;
+
+    viewParams->propertyValue( "landingsites", showLandingSites );
+    viewParams->propertyValue( "craters", showCraters );
+    viewParams->propertyValue( "maria", showMaria );
+
+    if ( !showPlaces && !showCities && !showTerrain && !showOtherPlaces &&
+         !showLandingSites && !showCraters && !showMaria )
+        return;
+
     if ( m_placemarkModel->rowCount() <= 0 )
         return;
 
@@ -223,21 +242,6 @@
     qreal x = 0;
     qreal y = 0;
 
-    // earth
-    bool showPlaces, showCities, showTerrain, showOtherPlaces;
-
-    viewParams->propertyValue( "places", showPlaces );
-    viewParams->propertyValue( "cities", showCities );
-    viewParams->propertyValue( "terrain", showTerrain );
-    viewParams->propertyValue( "otherplaces", showOtherPlaces );
-    
-    // other planets
-    bool showLandingSites, showCraters, showMaria;
-
-    viewParams->propertyValue( "landingsites", showLandingSites );
-    viewParams->propertyValue( "craters", showCraters );
-    viewParams->propertyValue( "maria", showMaria );
-
     GeoDataLatLonAltBox latLonAltBox = viewParams->viewport()->viewLatLonAltBox();
 
     /**
[prev in list] [next in list] [prev in thread] [next in thread] 

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