From 10c62a6863a87c17524cdde8544e178db047dd97 Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Tue, 2 Oct 2012 13:42:48 +0200 Subject: [PATCH] BUGFIX: Opening files was not always performing as expected. Fixed now. --- gui/Gui/Mainwindow.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/Gui/Mainwindow.py b/gui/Gui/Mainwindow.py index ada247d..f77d3d0 100644 --- a/gui/Gui/Mainwindow.py +++ b/gui/Gui/Mainwindow.py @@ -61,6 +61,8 @@ class MainWindow(wx.Frame): MainInitOnce() self.filename = 'noname.spdl' + self.filepath = "" + self.load = False # test @@ -199,8 +201,10 @@ class MainWindow(wx.Frame): dialog = wx.FileDialog(self, **dialogOptions) if dialog.ShowModal() == wx.ID_OK: userProvidedFilename = True - self.filename = dialog.GetFilename() - self.dirname = dialog.GetDirectory() + self.filepath = dialog.GetPath() + (p1,p2) = os.path.split(self.filepath) + self.dirname = p1 + self.filename = p2 self.SetTitle() # Update the window title with the new filename else: userProvidedFilename = False