Skip to content

Commit d2a18c2

Browse files
author
Marco Hugentobler
committedAug 28, 2012
Fix diagram scaling for print
1 parent fcf1dd8 commit d2a18c2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed
 

‎src/core/qgsdiagramrendererv2.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,7 @@ void QgsDiagramRendererV2::convertSizeToMapUnits( QSizeF& size, const QgsRenderC
184184
return;
185185
}
186186

187-
int dpi = dpiPaintDevice( context.constPainter() );
188-
if ( dpi < 0 )
189-
{
190-
return;
191-
}
192-
193-
double pixelToMap = dpi / 25.4 * context.mapToPixel().mapUnitsPerPixel();
187+
double pixelToMap = context.scaleFactor() * context.mapToPixel().mapUnitsPerPixel();
194188
size.rwidth() *= pixelToMap;
195189
size.rheight() *= pixelToMap;
196190
}

0 commit comments

Comments
 (0)
Please sign in to comment.