Merge pull request #1083 from paulmueller/fix-svg-export-scatter

fix faulty SVG export of scatter plots (KeyError: 'resolutionScale')
This commit is contained in:
Kenneth Lyons 2019-11-23 20:21:20 -08:00 committed by GitHub
commit 19c9e5460c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,7 @@ class GraphicsItem(object):
Extends deviceTransform to automatically determine the viewportTransform.
"""
if self._exportOpts is not False and 'painter' in self._exportOpts: ## currently exporting; device transform may be different.
scaler = self._exportOpts['resolutionScale']
scaler = self._exportOpts.get('resolutionScale', 1.0)
return self.sceneTransform() * QtGui.QTransform(scaler, 0, 0, scaler, 1, 1)
if viewportTransform is None: