Skip to content
Permalink
Browse files
gdal slow rendering when zoomed in fix
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15702 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Apr 15, 2011
1 parent 07a4fa0 commit d5febb5407c99dbacb156a536afcc8e7de2301d3
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/providers/gdal/qgsgdalprovider.cpp
@@ -691,10 +691,11 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent,
{
tmpWidth = static_cast<int>( qRound( srcWidth * srcXRes / xRes ) ) ;
}
if ( yRes > srcYRes )
if ( yRes > fabs( srcYRes ) )
{
tmpHeight = static_cast<int>( qRound( -1.*srcHeight * srcYRes / yRes ) ) ;
}

double tmpXMin = mExtent.xMinimum() + srcLeft * srcXRes;
double tmpYMax = mExtent.yMaximum() + srcTop * srcYRes;
QgsDebugMsg( QString( "tmpXMin = %1 tmpYMax = %2 tmpWidth = %3 tmpHeight = %4" ).arg( tmpXMin ).arg( tmpYMax ).arg( tmpWidth ).arg( tmpHeight ) );

0 comments on commit d5febb5

Please sign in to comment.