Navigation Menu

Skip to content

Commit

Permalink
gdal slow rendering when zoomed in fix
Browse files Browse the repository at this point in the history
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 a4659dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -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 ) );
Expand Down

0 comments on commit a4659dd

Please sign in to comment.