Skip to content

Commit a739750

Browse files
committedOct 30, 2011
Fix multiline overlap - Fix for #4454
1 parent f5bf2b4 commit a739750

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/core/qgspallabeling.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,11 @@ void QgsPalLayerSettings::calculateLabelSize( const QFontMetricsF* fm, QString t
434434
{
435435
text.append( ">" );
436436
}
437-
QRectF labelRect = fm->boundingRect( text );
437+
438438
double w, h;
439439
if ( !multiLineLabels )
440440
{
441+
QRectF labelRect = fm->boundingRect( text );
441442
w = labelRect.width() / rasterCompressFactor;
442443
h = labelRect.height() / rasterCompressFactor;
443444
}
@@ -452,9 +453,9 @@ void QgsPalLayerSettings::calculateLabelSize( const QFontMetricsF* fm, QString t
452453
if ( width > w )
453454
{
454455
w = width;
455-
}
456-
w /= rasterCompressFactor;
456+
}
457457
}
458+
w /= rasterCompressFactor;
458459
}
459460
QgsPoint ptSize = xform->toMapCoordinatesF( w, h );
460461

0 commit comments

Comments
 (0)
Please sign in to comment.