--- a/PLCOpenEditor.py Fri Mar 14 14:27:23 2025 +0100
+++ b/PLCOpenEditor.py Fri Mar 14 14:30:05 2025 +0100
@@ -360,7 +360,7 @@
directory, filename = os.path.split(filepath)
directory, filename = os.getcwd(), "%(projectName)s.xml" % self.Controler.GetProjectProperties()
- dialog = wx.FileDialog(self, _("Choose a file"), directory, filename, _("PLCOpen files (*.xml)|*.xml|All files|*.*"), wx.SAVE | wx.OVERWRITE_PROMPT)
+ dialog = wx.FileDialog(self, _("Choose a file"), directory, filename, _("PLCOpen files (*.xml)|*.xml|All files|*.*"), wx.FD_SAVE | wx.OVERWRITE_PROMPT) if dialog.ShowModal() == wx.ID_OK:
filepath = dialog.GetPath()
if os.path.isdir(os.path.dirname(filepath)):