[Marble-commits] KDE/kdeedu/marble/src/lib
Jens-Michael Hoffmann
jensmh at gmx.de
Mon Jul 20 16:44:09 CEST 2009
Am Saturday 18 July 2009 23:20:46 schrieb Torsten Rahn:
> SVN commit 998985 by rahn:
>
> Forward Port of 998984
>
>
> M +3 -4 GeoPainter.cpp
> M +7 -2 geodata/data/GeoDataLineString.cpp
>
>
> --- trunk/KDE/kdeedu/marble/src/lib/GeoPainter.cpp #998984:998985
> @@ -289,7 +289,8 @@
> GeoDataLatLonBox ellipseBox( centerLat + 0.5 * height, centerLat - 0.5 * height,
> centerLon + 0.5 * width, centerLon - 0.5 * width,
> GeoDataCoordinates::Degree );
> - if ( !d->m_viewport->resolves( ellipseBox ) ) return;
> + if ( !d->m_viewport->viewLatLonAltBox().intersects( ellipseBox ) ||
> + !d->m_viewport->resolves( ellipseBox ) ) return;
>
> GeoDataLinearRing ellipse;
> qreal lon = 0.0;
> @@ -316,7 +317,7 @@
> lon = centerLon + 0.5 * width * t;
> ellipse << GeoDataCoordinates( lon, lat, altitude, GeoDataCoordinates::Degree );
> }
> -
> +
> drawPolygon( ellipse );
>
> }
> @@ -431,9 +432,7 @@
> // qDebug() << "Polygon doesn't get displayed on the viewport";
> return;
> }
> -// qDebug() << "Drawing Polygon";
>
> -
> if ( !linearRing.latLonAltBox().crossesDateLine() ) {
> QVector<QPolygonF*> polygons;
> d->createPolygonsFromLinearRing( linearRing, polygons );
> --- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataLineString.cpp #998984:998985
> @@ -207,6 +207,7 @@
> void GeoDataLineString::append ( const GeoDataCoordinates& value )
> {
> GeoDataGeometry::detach();
> + p()->m_rangeCorrected.clear();
> p()->m_dirtyRange = true;
> p()->m_dirtyBox = true;
> p()->m_vector.append( value );
> @@ -215,6 +216,7 @@
> GeoDataLineString& GeoDataLineString::operator << ( const GeoDataCoordinates& value )
> {
> GeoDataGeometry::detach();
> + p()->m_rangeCorrected.clear();
> p()->m_dirtyRange = true;
> p()->m_dirtyBox = true;
> p()->m_vector.append( value );
> @@ -224,6 +226,7 @@
> void GeoDataLineString::clear()
> {
> GeoDataGeometry::detach();
> + p()->m_rangeCorrected.clear();
> p()->m_dirtyRange = true;
> p()->m_dirtyBox = true;
>
> @@ -296,13 +299,13 @@
> {
> if ( p()->m_dirtyRange ) {
>
> - qDeleteAll( p()->m_rangeCorrected );
> + qDeleteAll( p()->m_rangeCorrected ); // This shouldn't be needed
why not just remove it then?
>
> GeoDataLineString poleCorrected = toPoleCorrected();
>
> p()->m_rangeCorrected = poleCorrected.toDateLineCorrected();
> }
> -
> +
> return p()->m_rangeCorrected;
> }
>
> @@ -525,6 +528,7 @@
> QVector<GeoDataCoordinates>::Iterator GeoDataLineString::erase ( QVector<GeoDataCoordinates>::Iterator pos )
> {
> GeoDataGeometry::detach();
> + p()->m_rangeCorrected.clear();
> p()->m_dirtyRange = true;
> p()->m_dirtyBox = true;
> return p()->m_vector.erase( pos );
> @@ -534,6 +538,7 @@
> QVector<GeoDataCoordinates>::Iterator end )
> {
> GeoDataGeometry::detach();
> + p()->m_rangeCorrected.clear();
> p()->m_dirtyRange = true;
> p()->m_dirtyBox = true;
> return p()->m_vector.erase( begin, end );
> _______________________________________________
> Marble-commits mailing list
> Marble-commits at kde.org
> https://mail.kde.org/mailman/listinfo/marble-commits
>
More information about the Marble-commits
mailing list