Skip to content

Commit 8043ad6

Browse files
committed
Fixed #80: AttributeError when saving plot to PDF
1 parent 228bc77 commit 8043ad6

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# PythonQwt Releases
22

3+
## Version 0.10.4
4+
5+
- [Issue #80](https://github.com/PlotPyStack/PythonQwt/issues/80) - Print to PDF: AttributeError: 'NoneType' object has no attribute 'getContentsMargins'
6+
37
## Version 0.10.3
48

59
- [Issue #79](https://github.com/PlotPyStack/PythonQwt/issues/79) - TypeError: unexpected type 'QSize' (thanks to @luc-j-bourhis)

qwt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
.. _GitHub: https://github.com/PlotPyStack/PythonQwt
2828
"""
2929

30-
__version__ = "0.10.3"
30+
__version__ = "0.10.4"
3131
QWT_VERSION_STR = "6.1.5"
3232

3333
import warnings

qwt/plot_renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def render(self, plot, painter, plotRect):
356356
invtrans, _ok = transform.inverted()
357357
layoutRect = invtrans.mapRect(plotRect)
358358
if not (self.__data.discardFlags & self.DiscardBackground):
359-
left, top, right, bottom = plot.layout().getContentsMargins()
359+
left, top, right, bottom = plot.getContentsMargins()
360360
layoutRect.adjust(left, top, -right, -bottom)
361361

362362
layout = plot.plotLayout()

0 commit comments

Comments
 (0)