fix error on SVG export of scatter plots: KeyError: 'resolutionScale'

This commit is contained in:
Paul Müller 2019-11-23 13:10:49 +01:00
parent 78e218fe6c
commit b02ada024b
No known key found for this signature in database
GPG Key ID: 37E451377BE89B67

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: