X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/46831f391b0e5cbf41b76cd314bf1dfc1b390a9e..c079af66c8fb4a2f68f33c6d3940b8ad8ec98f27:/wxPython/wx/lib/ogl/_lines.py diff --git a/wxPython/wx/lib/ogl/_lines.py b/wxPython/wx/lib/ogl/_lines.py index d4da07dbd2..77ce392cac 100644 --- a/wxPython/wx/lib/ogl/_lines.py +++ b/wxPython/wx/lib/ogl/_lines.py @@ -218,16 +218,6 @@ class LineShape(Shape): self._lineControlPoints = [] self._arcArrows = [] - def __del__(self): - if self._lineControlPoints: - self._lineControlPoints = [] - for i in range(3): - if self._labelObjects[i]: - self._labelObjects[i].Select(False) - self._labelObjects[i].RemoveFromCanvas(self._canvas) - self._labelObjects = [] - self.ClearArrowsAtPosition(-1) - def GetFrom(self): """Return the 'from' object.""" return self._from @@ -492,6 +482,11 @@ class LineShape(Shape): self._from.GetLines().remove(self) self._to = None self._from = None + for i in range(3): + if self._labelObjects[i]: + self._labelObjects[i].Select(False) + self._labelObjects[i].RemoveFromCanvas(self._canvas) + self.ClearArrowsAtPosition(-1) def SetEnds(self, x1, y1, x2, y2): """Set the end positions of the line."""