Skip to content
Permalink
Browse files
gdal slow rendering when zoomed in fix
git-svn-id: http://svn.osgeo.org/qgis/trunk@15702 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Apr 15, 2011
1 parent eb3a535 commit a4659dd2f5fff5cb694f1d058521b6c43ca4afc9
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 a4659dd

Please sign in to comment.