[Marble-commits] KDE/kdeedu/marble/src/lib
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Wed Mar 23 15:57:21 CET 2011
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();
/**
More information about the Marble-commits
mailing list