Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix multiline overlap - Fix for #4454
  • Loading branch information
NathanW2 committed Oct 30, 2011
1 parent f5bf2b4 commit a739750
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/qgspallabeling.cpp
Expand Up @@ -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;
}
Expand All @@ -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 );

Expand Down

0 comments on commit a739750

Please sign in to comment.