SVGExporter: logicalDpiX instead of physicalDpiX

Fixes problems with non-aligning axes on Qt5 svg exports.  In the output
svg, the axes were (individually) scaled for physical/logical ration.
This commit is contained in:
Marko Toplak 2018-03-01 15:34:15 +01:00
parent 47d59c51f4
commit d09fe6bd47

View File

@ -169,7 +169,7 @@ def _generateItemSvg(item, nodes=None, root=None):
buf = QtCore.QBuffer(arr)
svg = QtSvg.QSvgGenerator()
svg.setOutputDevice(buf)
dpi = QtGui.QDesktopWidget().physicalDpiX()
dpi = QtGui.QDesktopWidget().logicalDpiX()
svg.setResolution(dpi)
p = QtGui.QPainter()