merge
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 07 Jan 2019 23:28:28 +0300
changeset 2502 e582e8ddd0c8
parent 2501 eba2bbb2dd9a (current diff)
parent 2498 516ff0a85a9e (diff)
child 2503 6ffeffb6d635
merge
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Sun Jan 06 03:11:39 2019 +0300
+++ b/PLCOpenEditor.py	Mon Jan 07 23:28:28 2019 +0300
@@ -305,7 +305,7 @@
         self.SaveProjectAs()
 
     def OnGenerateProgramMenu(self, event):
-        dialog = wx.FileDialog(self, _("Choose a file"), os.getcwd(), self.Controler.GetProgramFilePath(),  _("ST files (*.st)|*.st|All files|*.*"), wx.SAVE | wx.CHANGE_DIR)
+        dialog = wx.FileDialog(self, _("Choose a file"), os.getcwd(), os.path.basename(self.Controler.GetProgramFilePath()),  _("ST files (*.st)|*.st|All files|*.*"), wx.SAVE | wx.CHANGE_DIR)
         if dialog.ShowModal() == wx.ID_OK:
             filepath = dialog.GetPath()
             message_text = ""