Skip to content
Permalink
Browse files
remove CRs
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8306 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 31, 2008
1 parent ef8e342 commit aa4e0a14736dca26af6384c9d6883e3ee8c79979
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 aa4e0a1

Please sign in to comment.