Skip to content

Commit d5febb5

Browse files
author
rblazek
committedApr 15, 2011
gdal slow rendering when zoomed in fix
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15702 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/providers/gdal/qgsgdalprovider.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,10 +691,11 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent,
691691
{
692692
tmpWidth = static_cast<int>( qRound( srcWidth * srcXRes / xRes ) ) ;
693693
}
694-
if ( yRes > srcYRes )
694+
if ( yRes > fabs( srcYRes ) )
695695
{
696696
tmpHeight = static_cast<int>( qRound( -1.*srcHeight * srcYRes / yRes ) ) ;
697697
}
698+
698699
double tmpXMin = mExtent.xMinimum() + srcLeft * srcXRes;
699700
double tmpYMax = mExtent.yMaximum() + srcTop * srcYRes;
700701
QgsDebugMsg( QString( "tmpXMin = %1 tmpYMax = %2 tmpWidth = %3 tmpHeight = %4" ).arg( tmpXMin ).arg( tmpYMax ).arg( tmpWidth ).arg( tmpHeight ) );

0 commit comments

Comments
 (0)
Please sign in to comment.