# HG changeset patch
# User Andrey Skvortsov <andrej.skvortzov@gmail.com>
# Date 1546892908 -10800
# Node ID e582e8ddd0c8a55c5353b6f31e80a17c2d7c848e
# Parent  eba2bbb2dd9a5645221c9da9d4a2dee6f207a182# Parent  516ff0a85a9ed28780ed89735b88aec3ab451a69
merge

diff -r eba2bbb2dd9a -r e582e8ddd0c8 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 = ""