[QGIS Commit] r10116 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Feb 6 05:13:09 EST 2009


Author: jef
Date: 2009-02-06 05:13:09 -0500 (Fri, 06 Feb 2009)
New Revision: 10116

Modified:
   trunk/qgis/src/core/qgslabel.cpp
Log:
skip labels with size<=0 - otherwise the size is ignored

Modified: trunk/qgis/src/core/qgslabel.cpp
===================================================================
--- trunk/qgis/src/core/qgslabel.cpp	2009-02-06 05:05:29 UTC (rev 10115)
+++ trunk/qgis/src/core/qgslabel.cpp	2009-02-06 10:13:09 UTC (rev 10116)
@@ -91,7 +91,6 @@
                             QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes,
                             double sizeScale, double rasterScaleFactor )
 {
-
   QPen pen;
   QFont font;
   QString value;
@@ -163,11 +162,12 @@
   //and scale the painter down by rasterScaleFactor when drawing the label
   size *= rasterScaleFactor;
 
-  if ( size > 0.0 )
-  {
-    font.setPixelSize( size );
-  }
+  if (( int )size <= 0 )
+    // skip too small labels
+    return;
 
+  font.setPixelSize( size );
+
   value = fieldValue( Color, feature );
   if ( value.isEmpty() )
   {



More information about the QGIS-commit mailing list