mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
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:
parent
b5d3a15668
commit
7a8d9eaf5c
@ -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() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user