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

Bernhard Beschow bbeschow at cs.tu-berlin.de
Fri Sep 24 19:36:52 CEST 2010


SVN commit 1179151 by beschow:

use distanceFromZoom() rather than distanceFromRadius() and d->m_map->d->radius()

 M  +4 -8      MarbleWidget.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1179150:1179151
@@ -518,8 +518,7 @@
     }
     else {
         GeoDataLookAt target = d->m_map->lookAt();
-        int radius = d->m_map->d->radius( newZoom );
-        target.setRange( 1000 * d->m_map->distanceFromRadius( radius ) );
+        target.setRange( 1000 * d->m_map->distanceFromZoom( newZoom ) );
         flyTo( target, mode == Automatic ? Instant : mode );
     }
 }
@@ -540,8 +539,7 @@
     else {
         GeoDataLookAt target = d->m_map->lookAt();
         MarbleMap *map = d->m_map;
-        int newRadius = map->d->radius( map->zoom() + map->d->m_zoomStep );
-        target.setRange( 1000 * d->m_map->distanceFromRadius( newRadius ) );
+        target.setRange( 1000 * d->m_map->distanceFromZoom( map->zoom() + map->d->m_zoomStep ) );
         flyTo( target, mode );
     }
 }
@@ -555,8 +553,7 @@
     else {
         GeoDataLookAt target = d->m_map->lookAt();
         MarbleMap *map = d->m_map;
-        int newRadius = map->d->radius( map->zoom() - map->d->m_zoomStep );
-        target.setRange( 1000 * d->m_map->distanceFromRadius( newRadius ) );
+        target.setRange( 1000 * d->m_map->distanceFromZoom( map->zoom() - map->d->m_zoomStep ) );
         flyTo( target, mode );
     }
 }
@@ -867,8 +864,7 @@
         GeoDataLookAt target;
         target.setLongitude( homeLon, GeoDataCoordinates::Degree );
         target.setLatitude( homeLat, GeoDataCoordinates::Degree );
-        int radius = d->m_map->d->radius( homeZoom );
-        target.setRange( 1000 * d->m_map->distanceFromRadius( radius ) );
+        target.setRange( 1000 * d->m_map->distanceFromZoom( homeZoom ) );
 
         flyTo( target, mode );
     }


More information about the Marble-commits mailing list