Преглед на файлове

wxGUI: fix change current writing directory on Mac - style=wx.DD_CHANGE_DIR is not working on Mac (merge from trunk, https://trac.osgeo.org/grass/changeset/65110, https://trac.osgeo.org/grass/changeset/65128)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@65129 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová преди 10 години
родител
ревизия
2d5fb5d320
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      gui/wxpython/lmgr/frame.py

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

@@ -1030,14 +1030,14 @@ class GMFrame(wx.Frame):
                 self._giface.WriteError(str(error))
             write_end()
         else:
-            # 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()