Fix multiline overlap - Fix for #4454

This commit is contained in:
Nathan Woodrow 2011-10-28 23:20:58 +10:00
parent f5bf2b4110
commit a739750e45

View File

@ -434,10 +434,11 @@ void QgsPalLayerSettings::calculateLabelSize( const QFontMetricsF* fm, QString t
{
text.append( ">" );
}
QRectF labelRect = fm->boundingRect( text );
double w, h;
if ( !multiLineLabels )
{
QRectF labelRect = fm->boundingRect( text );
w = labelRect.width() / rasterCompressFactor;
h = labelRect.height() / rasterCompressFactor;
}
@ -452,9 +453,9 @@ void QgsPalLayerSettings::calculateLabelSize( const QFontMetricsF* fm, QString t
if ( width > w )
{
w = width;
}
w /= rasterCompressFactor;
}
}
w /= rasterCompressFactor;
}
QgsPoint ptSize = xform->toMapCoordinatesF( w, h );