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
This commit is contained in:
jef 2009-02-06 10:13:09 +00:00
parent b5d3a15668
commit 7a8d9eaf5c

View File

@ -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() )