equal
deleted
inserted
replaced
393 if self.PluginRoot.runningPLC is not None: |
393 if self.PluginRoot.runningPLC is not None: |
394 wx.MessageBox("Please stop any running PLC before closing") |
394 wx.MessageBox("Please stop any running PLC before closing") |
395 event.Veto() |
395 event.Veto() |
396 return |
396 return |
397 if self.PluginRoot.ProjectTestModified(): |
397 if self.PluginRoot.ProjectTestModified(): |
398 self.PluginRoot.SaveProject() |
398 dialog = wx.MessageDialog(self, "There are changes, do you want to save?", "Close Application", wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION) |
399 wx.MessageBox("Project saved") |
399 answer = dialog.ShowModal() |
|
400 dialog.Destroy() |
|
401 if answer == wx.ID_YES: |
|
402 self.PluginRoot.SaveProject() |
|
403 event.Skip() |
|
404 return |
|
405 elif answer == wx.ID_NO: |
|
406 event.Skip() |
|
407 return |
|
408 else: |
|
409 event.Veto() |
|
410 return |
400 event.Skip() |
411 event.Skip() |
401 |
412 |
402 def OnMoveWindow(self, event): |
413 def OnMoveWindow(self, event): |
403 self.GetBestSize() |
414 self.GetBestSize() |
404 self.RefreshScrollBars() |
415 self.RefreshScrollBars() |