Skip to content

Commit 8f891c5

Browse files
Marco Hugentoblerm-kuhn
Marco Hugentobler
authored andcommitted
Fix diagram scaling for print
1 parent 573d57f commit 8f891c5

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/core/qgsdiagramrendererv2.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,7 @@ void QgsDiagramRendererV2::convertSizeToMapUnits( QSizeF& size, const QgsRenderC
283283
return;
284284
}
285285

286-
int dpi = dpiPaintDevice( context.constPainter() );
287-
if ( dpi < 0 )
288-
{
289-
return;
290-
}
291-
292-
double pixelToMap = dpi / 25.4 * context.mapToPixel().mapUnitsPerPixel();
286+
double pixelToMap = context.scaleFactor() * context.mapToPixel().mapUnitsPerPixel();
293287
size.rwidth() *= pixelToMap;
294288
size.rheight() *= pixelToMap;
295289
}

0 commit comments

Comments
 (0)