wxglade_hmi/wxglade_hmi.py
changeset 1151 38d6aaad8ffd
parent 1132 28f96aa9c070
child 1155 412e30abf7e5
--- a/wxglade_hmi/wxglade_hmi.py	Thu May 16 00:00:35 2013 +0200
+++ b/wxglade_hmi/wxglade_hmi.py	Thu May 16 00:01:09 2013 +0200
@@ -65,7 +65,7 @@
         
         declare_hmi = "\n".join(map(lambda x:"%s = None" % x,
                                 hmi_frames.keys()))
-        global_hmi = "global "+",".join(hmi_frames.keys())
+        global_hmi = "global "+",".join(hmi_frames.keys()) + "\n"
         init_hmi = "\n".join(map(lambda x: """\
 def OnCloseFrame(evt):
     wx.MessageBox(_("Please stop PLC to close"))
@@ -79,7 +79,7 @@
         self.PreSectionsTexts = {
             "globals":define_hmi + declare_hmi,
             "start":global_hmi,
-            "stop":global_hmi
+            "stop":global_hmi + cleanup_hmi
         }
         self.PostSectionsTexts = {
             "start":init_hmi,