瀏覽代碼

wxGUI: fix change current writing directory on Mac - style=wx.DD_CHANGE_DIR is not working on Mac

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65110 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 年之前
父節點
當前提交
ce61878830
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gui/wxpython/lmgr/frame.py

+ 2 - 1
gui/wxpython/lmgr/frame.py

@@ -1041,11 +1041,12 @@ class GMFrame(wx.Frame):
             # style wx.DD_CHANGE_DIR changes the directory
             dlg = wx.DirDialog(parent=self,
                                message=_("Choose a working directory"),
-                               defaultPath=os.getcwd(), style=wx.DD_CHANGE_DIR)
+                               defaultPath=os.getcwd())
 
             if dlg.ShowModal() == wx.ID_OK:
                 self.cwdPath = dlg.GetPath()  # is saved in the workspace
                 write_beginning(parameter=self.cwdPath)
+                os.chdir(self.cwdPath)
                 write_changed()
                 write_end()