Skip to content

Commit daf1e0b

Browse files
committed
Fix #9661 (labels in composer rendered with wrong size)
1 parent cb919e9 commit daf1e0b

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/core/qgspallabeling.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3910,15 +3910,6 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
39103910

39113911
painter->setRenderHint( QPainter::Antialiasing );
39123912

3913-
//dpi ration for QPicture
3914-
QPicture localPict;
3915-
QPainter localp;
3916-
localp.begin( &localPict );
3917-
double localdpi = ( localp.device()->logicalDpiX() + localp.device()->logicalDpiY() ) / 2;
3918-
double contextdpi = ( painter->device()->logicalDpiX() + painter->device()->logicalDpiY() ) / 2;
3919-
double dpiRatio = localdpi / contextdpi;
3920-
localp.end();
3921-
39223913
// draw the labels
39233914
std::list<LabelPosition*>::iterator it = labels->begin();
39243915
for ( ; it != labels->end(); ++it )
@@ -4018,15 +4009,15 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
40184009

40194010
if ( tmpLyr.shapeDraw )
40204011
{
4021-
drawLabel( *it, context, tmpLyr, LabelShape, dpiRatio );
4012+
drawLabel( *it, context, tmpLyr, LabelShape );
40224013
}
40234014

40244015
if ( tmpLyr.bufferDraw )
40254016
{
4026-
drawLabel( *it, context, tmpLyr, LabelBuffer, dpiRatio );
4017+
drawLabel( *it, context, tmpLyr, LabelBuffer );
40274018
}
40284019

4029-
drawLabel( *it, context, tmpLyr, LabelText, dpiRatio );
4020+
drawLabel( *it, context, tmpLyr, LabelText );
40304021

40314022
if ( mResults->mLabelSearchTree )
40324023
{

0 commit comments

Comments
 (0)