X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f31297359f62fa8671413c75c769ee952af8901..e6a99197fb89047a88f72da519b8fee18a316a7c:/wxPython/wx/lib/ogl/_basic.py

diff --git a/wxPython/wx/lib/ogl/_basic.py b/wxPython/wx/lib/ogl/_basic.py
index 441862b7d0..4ace078e44 100644
--- a/wxPython/wx/lib/ogl/_basic.py
+++ b/wxPython/wx/lib/ogl/_basic.py
@@ -288,9 +288,16 @@ class Shape(ShapeEvtHandler):
         return str(self.__class__).split(".")[-1][:-2]
 
     def Delete(self):
+        """
+        Fully disconnect this shape from parents, children, the
+        canvas, etc.
+        """
         if self._parent:
             self._parent.GetChildren().remove(self)
 
+        for child in self.GetChildren():
+            child.Delete()
+
         self.ClearText()
         self.ClearRegions()
         self.ClearAttachments()
@@ -1159,7 +1166,7 @@ class Shape(ShapeEvtHandler):
         """Flash the shape."""
         if self.GetCanvas():
             dc = wx.ClientDC(self.GetCanvas())
-            self.GetCanvas.PrepareDC(dc)
+            self.GetCanvas().PrepareDC(dc)
 
             dc.SetLogicalFunction(OGLRBLF)
             self.Draw(dc)
@@ -2171,7 +2178,7 @@ class Shape(ShapeEvtHandler):
         dc.SetLogicalFunction(OGLRBLF)
 
         bound_x, bound_y = self.GetBoundingBoxMin()
-        self.GetEventHandler().OnEndSize(bound_x, bound_y)
+        self.GetEventHandler().OnBeginSize(bound_x, bound_y)
 
         # Choose the 'opposite corner' of the object as the stationary
         # point in case this is non-centring resizing.
@@ -3040,7 +3047,7 @@ class ShapeRegion(object):
             return None
         if self._penColour=="Invisible":
             return None
-        self._actualPenObject = wx.ThePenList.FindOrCreatePen(self._penColour, 1, self._penStyle)
+        self._actualPenObject = wx.Pen(self._penColour, 1, self._penStyle)
         return self._actualPenObject
 
     def SetText(self, s):