From eecf68dc98a63811fb281b5955822b88ff6bbabd Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Mon, 24 Feb 2020 23:15:33 +0100 Subject: [PATCH] Fixing obsolete constants usage for wxPython. --- gui/Gui/Mainwindow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/Gui/Mainwindow.py b/gui/Gui/Mainwindow.py index 0e99167..4f298b2 100644 --- a/gui/Gui/Mainwindow.py +++ b/gui/Gui/Mainwindow.py @@ -288,7 +288,7 @@ class MainWindow(wx.Frame): def OnOpen(self, event): if self.ConfirmLoss("Open"): - if self.askUserForFilename(style=wx.OPEN, + if self.askUserForFilename(style=wx.FD_OPEN, **self.defaultFileDialogOptions()): textfile = open(os.path.join(self.dirname, self.filename), 'r') self.editor.SetText(textfile.read()) @@ -298,7 +298,7 @@ class MainWindow(wx.Frame): return False def OnSaveAs(self, event): - if self.askUserForFilename(defaultFile=self.filename, style=wx.SAVE, + if self.askUserForFilename(defaultFile=self.filename, style=wx.FD_SAVE, **self.defaultFileDialogOptions()): self.OnSave(event) os.chdir(self.dirname)