]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/ogl/_composit.py
Partial fix to bug #1040607: support for vertical orientation in win32 renderer of...
[wxWidgets.git] / wxPython / wx / lib / ogl / _composit.py
index fba79f3b7367e1d82c035b43854f2e7385851d25..d6913abc428a5f22f32c317f0bd71313c6aab8ec 100644 (file)
@@ -552,8 +552,10 @@ class CompositeShape(RectangleShape):
         """Removes the child from the composite and any constraint
         relationships, but does not delete the child.
         """
         """Removes the child from the composite and any constraint
         relationships, but does not delete the child.
         """
-        self._children.remove(child)
-        self._divisions.remove(child)
+        if child in self._children:
+            self._children.remove(child)
+        if child in self._divisions:
+            self._divisions.remove(child)
         self.RemoveChildFromConstraints(child)
         child.SetParent(None)
 
         self.RemoveChildFromConstraints(child)
         child.SetParent(None)