[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/data

Patrick Spendrin ps_ml at gmx.de
Thu Jul 9 17:26:59 CEST 2009


SVN commit 993864 by sengels:

depending on the type, use different objects here too.
This fixes the problems on the dateline.

 M  +9 -3      GeoDataLineString.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataLineString.cpp #993863:993864
@@ -317,9 +317,15 @@
 
 GeoDataLineString GeoDataLineString::toPoleCorrected() const
 {
-    GeoDataLineString poleCorrected;
-    p()->toPoleCorrected( *this, poleCorrected );
-    return poleCorrected;
+    if( isClosed() ) {
+        GeoDataLinearRing poleCorrected;
+        p()->toPoleCorrected( *this, poleCorrected );
+        return poleCorrected;
+    } else {
+        GeoDataLineString poleCorrected;
+        p()->toPoleCorrected( *this, poleCorrected );
+        return poleCorrected;
+    }
 }
 
 void GeoDataLineStringPrivate::toPoleCorrected( const GeoDataLineString& q, GeoDataLineString& poleCorrected )


More information about the Marble-commits mailing list