graphics: avoid error in case of multiple rremove: same behavior as remove_widget(). closes #481

This commit is contained in:
Mathieu Virbel 2012-10-29 03:15:23 +01:00
parent f31acf830d
commit 65a9ea4586
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,8 @@ cdef class Instruction:
self.set_parent(ig)
cdef void rremove(self, InstructionGroup ig):
if self.parent is None:
return
ig.children.remove(self)
self.set_parent(None)