[Marble-commits] KDE/kdeedu/marble/src/lib
Torsten Rahn
tackat at kde.org
Tue Jul 28 15:31:36 CEST 2009
SVN commit 1003620 by rahn:
- Second attempt to prevent the zero distance.
M +7 -0 MarbleWidget.cpp
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1003619:1003620
@@ -570,6 +570,13 @@
GeoDataCoordinates targetPosition = position;
targetPosition.setAltitude( distance() );
+ // Avoid zero distance
+ qreal minDistance = 0.0001;
+
+ if ( targetPosition <= 0.0001 ) {
+ targetPosition = minDistance;
+ }
+
d->m_physics->jumpTo( targetPosition );
} else {
qreal lon, lat;
More information about the Marble-commits
mailing list