X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14fe087a0cebfafb2bfa7a39337e9457006daf40..aca310e5cc45db153540efe2df577d8f985ccfc1:/wxPython/wx/lib/ogl/_composit.py?ds=sidebyside diff --git a/wxPython/wx/lib/ogl/_composit.py b/wxPython/wx/lib/ogl/_composit.py index 812b7539a1..d07c3993a5 100644 --- a/wxPython/wx/lib/ogl/_composit.py +++ b/wxPython/wx/lib/ogl/_composit.py @@ -559,6 +559,18 @@ class CompositeShape(RectangleShape): self.RemoveChildFromConstraints(child) child.SetParent(None) + def Delete(self): + """ + Fully disconnect this shape from parents, children, the + canvas, etc. + """ + for child in self.GetChildren(): + self.RemoveChild(child) + child.Delete() + RectangleShape.Delete(self) + self._constraints = [] + self._divisions = [] + def DeleteConstraintsInvolvingChild(self, child): """This function deletes constraints which mention the given child.