Adding support for checking that tab content is saved before closing it
authorlaurent
Tue, 31 Jul 2012 17:46:01 +0200
changeset 797 61280a7d9ff2
parent 796 92071c4b85e9
child 798 0d2423f283a6
Adding support for checking that tab content is saved before closing it
Beremiz.py
--- a/Beremiz.py	Tue Jul 31 17:38:18 2012 +0200
+++ b/Beremiz.py	Tue Jul 31 17:46:01 2012 +0200
@@ -559,6 +559,12 @@
                 self.CTR.SaveProject()
             elif answer == wx.ID_CANCEL:
                 return False
+        
+        for idx in xrange(self.TabsOpened.GetPageCount()):
+            window = self.TabsOpened.GetPage(idx)
+            if not window.CheckSaveBeforeClosing():
+                return False
+        
         return True
     
     def GetTabInfos(self, tab):