[Marble-commits] branches/KDE/4.3/kdeedu/marble/src
Torsten Rahn
tackat at kde.org
Wed Jul 22 03:45:05 CEST 2009
SVN commit 1000795 by rahn:
- Backport of 1000794
M +12 -3 lib/GeoPainter.cpp
M +2 -2 plugins/render/geodata/GeoRendererPlugin.cpp
--- branches/KDE/4.3/kdeedu/marble/src/lib/GeoPainter.cpp #1000794:1000795
@@ -374,7 +374,10 @@
LabelPositionFlags labelPositionFlags )
{
// If the object is not visible in the viewport return
- if ( ! d->m_viewport->viewLatLonAltBox().intersects( lineString.latLonAltBox() ) )
+ if ( ! d->m_viewport->viewLatLonAltBox().intersects( lineString.latLonAltBox() ) ||
+ // If the size of the object is below the resolution of the viewport then return
+ ! d->m_viewport->resolves( lineString.latLonAltBox() )
+ )
{
// qDebug() << "LineString doesn't get displayed on the viewport";
return;
@@ -421,7 +424,10 @@
void GeoPainter::drawPolygon ( const GeoDataLinearRing & linearRing, Qt::FillRule fillRule )
{
// If the object is not visible in the viewport return
- if ( ! d->m_viewport->viewLatLonAltBox().intersects( linearRing.latLonAltBox() ) )
+ if ( ! d->m_viewport->viewLatLonAltBox().intersects( linearRing.latLonAltBox() ) ||
+ // If the size of the object is below the resolution of the viewport then return
+ ! d->m_viewport->resolves( linearRing.latLonAltBox() )
+ )
{
// qDebug() << "Polygon doesn't get displayed on the viewport";
return;
@@ -469,7 +475,10 @@
void GeoPainter::drawPolygon ( const GeoDataPolygon & polygon, Qt::FillRule fillRule )
{
// If the object is not visible in the viewport return
- if ( ! d->m_viewport->viewLatLonAltBox().intersects( polygon.outerBoundary().latLonAltBox() ) )
+ if ( ! d->m_viewport->viewLatLonAltBox().intersects( polygon.outerBoundary().latLonAltBox() ) ||
+ // If the size of the object is below the resolution of the viewport then return
+ ! d->m_viewport->resolves( polygon.outerBoundary().latLonAltBox() )
+ )
{
// qDebug() << "Polygon doesn't get displayed on the viewport";
return;
--- branches/KDE/4.3/kdeedu/marble/src/plugins/render/geodata/GeoRendererPlugin.cpp #1000794:1000795
@@ -61,7 +61,7 @@
QStringList GeoRendererPlugin::renderPosition() const
{
- return QStringList( "SURFACE" );
+ return QStringList( "HOVERS_ABOVE_SURFACE" );
}
QString GeoRendererPlugin::name() const
@@ -107,7 +107,7 @@
Q_UNUSED( renderPos )
Q_UNUSED( layer )
- if ( renderPos != "SURFACE" ) {
+ if ( renderPos != "HOVERS_ABOVE_SURFACE" ) {
return true;
}
More information about the Marble-commits
mailing list