Browse Source

wxGUI/modeler: fix python save as

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67471 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 9 năm trước cách đây
mục cha
commit
bb95c060e7
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      gui/wxpython/gmodeler/frame.py

+ 1 - 1
gui/wxpython/gmodeler/frame.py

@@ -1748,7 +1748,7 @@ class PythonPanel(wx.Panel):
         filename = ''
         filename = ''
         dlg = wx.FileDialog(parent = self,
         dlg = wx.FileDialog(parent = self,
                             message = _("Choose file to save"),
                             message = _("Choose file to save"),
-                            defaultFile = self.parent.GetModelFile(ext=False) + '.py',
+                            defaultFile = os.path.basename(self.parent.GetModelFile(ext=False)) + '.py',
                             defaultDir = os.getcwd(),
                             defaultDir = os.getcwd(),
                             wildcard = _("Python script (*.py)|*.py"),
                             wildcard = _("Python script (*.py)|*.py"),
                             style = wx.FD_SAVE)
                             style = wx.FD_SAVE)