浏览代码

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 年之前
父节点
当前提交
bb95c060e7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gui/wxpython/gmodeler/frame.py

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

@@ -1748,7 +1748,7 @@ class PythonPanel(wx.Panel):
         filename = ''
         dlg = wx.FileDialog(parent = self,
                             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(),
                             wildcard = _("Python script (*.py)|*.py"),
                             style = wx.FD_SAVE)