[gcompris/gcomprixogoo] Fixed a major bug, now the children drawing is properly destroyed when we



commit 9684326ca945ddc3b5ecb2d725e9f82d41928983
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Mon Nov 23 21:43:43 2009 +0100

    Fixed a major bug, now the children drawing is properly destroyed when we
    quit the activity.

 src/anim-activity/anim.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/anim-activity/anim.py b/src/anim-activity/anim.py
index dc9a010..21d93a9 100644
--- a/src/anim-activity/anim.py
+++ b/src/anim-activity/anim.py
@@ -193,6 +193,8 @@ class Gcompris_anim:
     gcompris.set_cursor(gcompris.CURSOR_DEFAULT);
     self.rootitem.remove()
 
+    del self.doc
+
   def pause(self, pause):
     return
 
@@ -702,6 +704,9 @@ class Document:
     self.pickle_protocol = 2
     self.format_string = { 'gcompris' : 'GCompris anim 3 cPikle file' }
 
+  def __del__(self):
+    self.rootitem.remove()
+
   def refresh(self, time):
     # We keep all object in a unique list
     # Here we call them to give them a chance to



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]