Skip to content

Commit

Permalink
Fixed #77: AttributeError when QwtPlot is being deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Oct 1, 2023
1 parent e4c8550 commit 1eb1b68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- Unit tests: added support for ``pytest`` and ``coverage`` (60% coverage as of today)

- [Issue #77](https://github.com/PlotPyStack/PythonQwt/issues/77) - AttributeError: 'XXX' object has no attribute '_QwtPlot__data'

- [Issue #72](https://github.com/PlotPyStack/PythonQwt/issues/72) - AttributeError: 'QwtScaleWidget' object has no attribute 'maxMajor' / 'maxMinor' / 'stepSize'

- [Issue #76](https://github.com/PlotPyStack/PythonQwt/issues/76) - [PySide] AttributeError: 'QwtPlotCanvas' object has no attribute 'Sunken'
Expand Down
11 changes: 0 additions & 11 deletions qwt/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,17 +361,6 @@ def __init__(self, *args):

qwtEnableLegendItems(self, True)

def __del__(self):
self.setAutoReplot(False)
# XXX Is is really necessary in Python? (pure transcription of C++)
# The following line have been commented to avoid crashing Python
# when exiting interpreter (Python 3 only)

# self.detachItems(QwtPlotItem.Rtti_PlotItem, self.autoDelete())
# self.__data.layout = None
# self.deleteAxesData()
# self.__data = None

def setFlatStyle(self, state):
"""
Set or reset the flatStyle option
Expand Down

0 comments on commit 1eb1b68

Please sign in to comment.