[QGIS Commit] r11868 - trunk/qgis/src/core/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Oct 30 05:45:18 EDT 2009


Author: mhugent
Date: 2009-10-30 05:45:17 -0400 (Fri, 30 Oct 2009)
New Revision: 11868

Modified:
   trunk/qgis/src/core/composer/qgscomposermap.cpp
Log:
fix for screen update problems with composer grid annotations

Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-10-30 09:34:45 UTC (rev 11867)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-10-30 09:45:17 UTC (rev 11868)
@@ -1246,7 +1246,7 @@
   QList< QPair< double, QLineF > >::const_iterator it = xLines.constBegin();
   for ( ; it != xLines.constEnd(); ++it )
   {
-    currentAnnotationString = QString::number( it->first );
+    currentAnnotationString = QString::number( it->first, 'f', mGridAnnotationPrecision );
     currentExtension = std::max( textWidthMillimeters( mGridAnnotationFont, currentAnnotationString ), fontAscentMillimeters( mGridAnnotationFont ) );
     maxExtension = std::max( maxExtension, currentExtension );
   }
@@ -1254,7 +1254,7 @@
   it = yLines.constBegin();
   for ( ; it != yLines.constEnd(); ++it )
   {
-    currentAnnotationString = QString::number( it->first );
+    currentAnnotationString = QString::number( it->first, 'f', mGridAnnotationPrecision );
     currentExtension = std::max( textWidthMillimeters( mGridAnnotationFont, currentAnnotationString ), fontAscentMillimeters( mGridAnnotationFont ) );
     maxExtension = std::max( maxExtension, currentExtension );
   }



More information about the QGIS-commit mailing list