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/qgis@10116 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Feb 6, 2009
1 parent 10b05ab commit 85bbe403188fb841b54e9d272f63572dd916ae4d
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 85bbe40

Please sign in to comment.