Skip to content
Permalink
Browse files
remove CRs
git-svn-id: http://svn.osgeo.org/qgis/trunk@8306 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 31, 2008
1 parent 283fc97 commit 126fa8663ecb0eb3fca81142beac65121000634a
Showing with 13 additions and 13 deletions.
  1. +13 −13 src/gui/qgsmapcanvas.cpp
@@ -447,19 +447,19 @@ void QgsMapCanvas::setExtent(QgsRect const & r)
return;
}

QgsRect current = extent();

if (r.isEmpty())
{
QgsDebugMsg("Empty extent - keeping old extent with new center!");
QgsRect e( QgsPoint( r.center().x()-current.width()/2.0, r.center().y()-current.height()/2.0 ),
QgsPoint( r.center().x()+current.width()/2.0, r.center().y()+current.height()/2.0 ) );
mMapRender->setExtent(e);
}
else
{
mMapRender->setExtent(r);
}
QgsRect current = extent();

if (r.isEmpty())
{
QgsDebugMsg("Empty extent - keeping old extent with new center!");
QgsRect e( QgsPoint( r.center().x()-current.width()/2.0, r.center().y()-current.height()/2.0 ),
QgsPoint( r.center().x()+current.width()/2.0, r.center().y()+current.height()/2.0 ) );
mMapRender->setExtent(e);
}
else
{
mMapRender->setExtent(r);
}
emit extentsChanged();
updateScale();
if (mMapOverview)

0 comments on commit 126fa86

Please sign in to comment.