--- a/Beremiz_service.py Fri May 10 13:15:18 2013 +0200
+++ b/Beremiz_service.py Fri May 10 15:17:33 2013 +0200
@@ -306,8 +306,10 @@
InspectionTool().Show(wnd, True)
def OnTaskBarQuit(self, evt):
+ if wx.Platform == '__WXMSW__':
+ Thread(target=self.pyroserver.Quit).start()
self.RemoveIcon()
- wx.CallAfter(wx.GetApp().Exit)
+ wx.CallAfter(wx.GetApp().ExitMainLoop)
def UpdateIcon(self, plcstatus):
if plcstatus is "Started" :
@@ -381,7 +383,6 @@
self.servicepublisher.RegisterService(self.servicename, self.ip_addr, self.port)
if self.autostart and self.plcobj.GetPLCstatus()[0] != "Empty":
- self.plcobj.LoadPLC()
self.plcobj.StartPLC()
sys.stdout.flush()
--- a/runtime/PLCObject.py Fri May 10 13:15:18 2013 +0200
+++ b/runtime/PLCObject.py Fri May 10 15:17:33 2013 +0200
@@ -74,6 +74,7 @@
self.CurrentPLCFilename=open(
self._GetMD5FileName(),
"r").read().strip() + lib_ext
+ self.LoadPLC()
except Exception, e:
self.PLCStatus = "Empty"
self.CurrentPLCFilename=None