[Marble-commits] KDE/kdeedu/marble/src/lib
    Dennis Nienhüser 
    earthwings at gentoo.org
       
    Fri Feb 19 22:52:45 CET 2010
    
    
  
SVN commit 1092972 by nienhueser:
Calculate the cached zoom value inside setRadius(), not each time before calling it. Fixes MarbleWidget::centerOn(GeoDataLatLonBox) confusing the internal zoom state.
 M  +1 -2      MarbleMap.cpp  
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp #1092971:1092972
@@ -450,6 +450,7 @@
         setNeedsUpdate();
     }
 
+    d->m_logzoom = d->zoom(radius);
     emit zoomChanged( d->m_logzoom );
     emit distanceChanged(distanceString());
 }
@@ -530,7 +531,6 @@
     }    
 
     int newRadius = radiusFromDistance(newDistance);
-    d->m_logzoom = d->zoom(newRadius);
     setRadius(newRadius);
 }
 
@@ -741,7 +741,6 @@
     // Prevent infinite loops.
     if ( newZoom  == d->m_logzoom )
         return;
-    d->m_logzoom = newZoom;
     setRadius( d->radius( newZoom ) );
 
     // We don't do this on every paintEvent to improve performance.
    
    
More information about the Marble-commits
mailing list