[Marble-commits] branches/KDE/4.5/kdeedu/marble/src/lib
Bastian Holst
bastianholst at gmx.de
Wed Oct 13 23:05:31 CEST 2010
SVN commit 1185602 by bholst:
* Round, don't cut.
* Make sure the right zoom-level is saved.
BUG: 249628
backport r1185567
backport r1185591
M +10 -3 MarbleMap.cpp
--- branches/KDE/4.5/kdeedu/marble/src/lib/MarbleMap.cpp #1185601:1185602
@@ -409,13 +409,12 @@
setNeedsUpdate();
}
- d->m_logzoom = d->zoom( radius );
+ d->m_logzoom = qRound( d->zoom( radius ) );
emit zoomChanged( d->m_logzoom );
emit distanceChanged( distanceString() );
emit visibleLatLonAltBoxChanged( d->m_viewParams.viewport()->viewLatLonAltBox() );
}
-
bool MarbleMap::needsUpdate() const
{
return ( d->m_justModified
@@ -700,8 +699,16 @@
// Prevent infinite loops.
if ( newZoom == d->m_logzoom )
return;
- setRadius( d->radius( newZoom ) );
+ d->m_viewParams.setRadius( d->radius( newZoom ) );
+
+ setNeedsUpdate();
+
+ d->m_logzoom = newZoom;
+ emit zoomChanged( d->m_logzoom );
+ emit distanceChanged( distanceString() );
+ emit visibleLatLonAltBoxChanged( d->m_viewParams.viewport()->viewLatLonAltBox() );
+
// We don't do this on every paintEvent to improve performance.
// Redrawing the atmosphere is only needed if the size of the
// globe changes.
More information about the Marble-commits
mailing list