beremiz

ef6902c824f2
Parents 5def24850a28
Children ed95aa627647
Ask to stop PLC before transfer if it is running
--- a/ProjectController.py Mon Feb 12 11:32:48 2018 +0100
+++ b/ProjectController.py Mon Feb 12 11:34:07 2018 +0100
@@ -1808,6 +1808,16 @@
self._SetConnector(None)
def _Transfer(self):
+ if self.IsPLCStarted():
+ dialog = wx.MessageDialog(
+ self.AppFrame,
+ _("Cannot transfer while PLC is running. Stop it now?"),
+ style=wx.YES_NO|wx.CENTRE)
+ if dialog.ShowModal() == wx.ID_YES:
+ self._Stop()
+ else:
+ return
+
# Get the last build PLC's
MD5 = self.GetLastBuildMD5()