Close PLC editing and PLC debugging frames while closing project
authorlaurent
Thu, 27 Aug 2009 12:47:40 +0200
changeset 382 37f870528def
parent 381 5c0f34a9ab00
child 383 9ae15ab058f3
Close PLC editing and PLC debugging frames while closing project
Beremiz.py
plugger.py
--- a/Beremiz.py	Fri Aug 14 16:26:19 2009 +0200
+++ b/Beremiz.py	Thu Aug 27 12:47:40 2009 +0200
@@ -1305,6 +1305,7 @@
                 elif answer == wx.ID_CANCEL:
                     return
             self.PluginInfos = {}
+            self.PluginRoot.CloseProject()
             self.PluginRoot = None
             self.Log.flush()
             self.RefreshAll()
--- a/plugger.py	Fri Aug 14 16:26:19 2009 +0200
+++ b/plugger.py	Thu Aug 27 12:47:40 2009 +0200
@@ -870,6 +870,13 @@
         if result:
             self.logger.write_error(result)
     
+    def CloseProject(self):
+        if self.PLCEditor is not None:
+            self.PLCEditor.Close()
+        if self.PLCDebug is not None:
+            self.PLCDebug.Close()
+        
+    
     # Update PLCOpenEditor Plugin Block types from loaded plugins
     def RefreshPluginsBlockLists(self):
         if getattr(self, "PluggedChilds", None) is not None: