ProjectController.py
changeset 1928 ef6902c824f2
parent 1902 2b7e2db31d81
child 1948 b9a3f771aaab
--- 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()