fixed bug with config
authorgreg
Fri, 17 Oct 2008 13:27:03 +0200
changeset 258 54c02b82da5f
parent 257 a4b01f57069a
child 259 f527d1c3f630
fixed bug with config
Beremiz.py
--- a/Beremiz.py	Fri Oct 17 13:03:19 2008 +0200
+++ b/Beremiz.py	Fri Oct 17 13:27:03 2008 +0200
@@ -1186,10 +1186,10 @@
         
         dialog = wx.DirDialog(self , "Choose a project", defaultpath, wx.DD_NEW_DIR_BUTTON)
         if dialog.ShowModal() == wx.ID_OK:
+            projectpath = dialog.GetPath()
+            dialog.Destroy()
             config.Write("lastopenedfolder", os.path.dirname(projectpath))
             config.Flush()
-            projectpath = dialog.GetPath()
-            dialog.Destroy()
             self.PluginRoot = PluginsRoot(self, self.Log, self.runtime_port)
             res = self.PluginRoot.NewProject(projectpath)
             if not res :