# HG changeset patch
# User Edouard Tisserant <edouard.tisserant@gmail.com>
# Date 1733662776 -3600
# Node ID f273ee8354112e5d7f3cb3e5428d04b07044e16a
# Parent  6668dcbca9151bc0734fe7c8c3884e464117047e
PLCOpen editor: fix exception when using file open dialog

Consequence of wxPython 3 to 4 API changes.

diff -r 6668dcbca915 -r f273ee835411 PLCOpenEditor.py
--- a/PLCOpenEditor.py	Sun Dec 08 11:41:31 2024 +0100
+++ b/PLCOpenEditor.py	Sun Dec 08 13:59:36 2024 +0100
@@ -273,7 +273,7 @@
 
         result = None
 
-        dialog = wx.FileDialog(self, _("Choose a file"), directory, "",  _("PLCOpen files (*.xml)|*.xml|All files|*.*"), wx.OPEN)
+        dialog = wx.FileDialog(self, _("Choose a file"), directory, "",  _("PLCOpen files (*.xml)|*.xml|All files|*.*"), wx.FD_OPEN)
         if dialog.ShowModal() == wx.ID_OK:
             filepath = dialog.GetPath()
             if os.path.isfile(filepath):