]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/samples/doodle/superdoodle.py
fixed outdated filenames
[wxWidgets.git] / wxPython / samples / doodle / superdoodle.py
index 68584ed27e0ed8a674ee6400d9d0843985faff3a..92fdf37ae8160d609554aabb0a8cc3dd76254fbd 100644 (file)
@@ -35,7 +35,8 @@ class DoodleFrame(wxFrame):
     """
     title = "Do a doodle"
     def __init__(self, parent):
-        wxFrame.__init__(self, parent, -1, self.title, size=(800,600))
+        wxFrame.__init__(self, parent, -1, self.title, size=(800,600),
+                         style=wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE)
         self.CreateStatusBar()
         self.MakeMenu()
         self.filename = None
@@ -55,6 +56,13 @@ class DoodleFrame(wxFrame):
         self.SetAutoLayout(true)
         self.SetSizer(box)
 
+        EVT_CLOSE(self, self.OnCloseWindow)
+
+
+    def OnCloseWindow(self, event):
+        self.doodle.Cleanup()
+        self.Destroy()
+
 
     def SaveFile(self):
         if self.filename: