[QGIS Commit] r15702 - trunk/qgis/src/providers/gdal

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Apr 15 07:21:41 EDT 2011


Author: rblazek
Date: 2011-04-15 04:21:41 -0700 (Fri, 15 Apr 2011)
New Revision: 15702

Modified:
   trunk/qgis/src/providers/gdal/qgsgdalprovider.cpp
Log:
gdal slow rendering when zoomed in fix

Modified: trunk/qgis/src/providers/gdal/qgsgdalprovider.cpp
===================================================================
--- trunk/qgis/src/providers/gdal/qgsgdalprovider.cpp	2011-04-15 10:18:37 UTC (rev 15701)
+++ trunk/qgis/src/providers/gdal/qgsgdalprovider.cpp	2011-04-15 11:21:41 UTC (rev 15702)
@@ -691,10 +691,11 @@
   {
     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 ) );



More information about the QGIS-commit mailing list