Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 aa4e0a1
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit aa4e0a1

Please sign in to comment.