Skip to content
Permalink
Browse files

skip labels with size<=0 - otherwise the size is ignored

git-svn-id: http://svn.osgeo.org/qgis/trunk@10116 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 6, 2009
1 parent b5d3a15 commit 7a8d9eaf5c7e905f1ca2cee052014e49564f1ab4
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/core/qgslabel.cpp
@@ -91,7 +91,6 @@ void QgsLabel::renderLabel( QPainter * painter, const QgsRectangle& viewExtent,
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes,
double sizeScale, double rasterScaleFactor )
{

QPen pen;
QFont font;
QString value;
@@ -163,10 +162,11 @@ void QgsLabel::renderLabel( QPainter * painter, const QgsRectangle& viewExtent,
//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() )

0 comments on commit 7a8d9ea

Please sign in to comment.
You can’t perform that action at this time.