浏览代码

wxGUI: another attempt to fix https://trac.osgeo.org/grass/ticket/1496

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49750 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 年之前
父节点
当前提交
5390bf9eb9
共有 3 个文件被更改,包括 5 次插入3 次删除
  1. 0 2
      gui/wxpython/core/gcmd.py
  2. 2 0
      gui/wxpython/gui_core/forms.py
  3. 3 1
      gui/wxpython/gui_core/prompt.py

+ 0 - 2
gui/wxpython/core/gcmd.py

@@ -635,8 +635,6 @@ def RunCommand(prog, flags = "", overwrite = False, quiet = False, verbose = Fal
     if sys.platform == "win32":
         if prog in globalvar.grassCmd['script']:
             prog += globalvar.EXT_SCT
-        # else:
-        # prog += globalvar.EXT_BIN
     
     ps = grass.start_command(prog, flags, overwrite, quiet, verbose, **kwargs)
     

+ 2 - 0
gui/wxpython/gui_core/forms.py

@@ -1966,6 +1966,8 @@ class GUI:
         # parse the interface decription
         try:
             global _blackList
+            if sys.platform == "win32" and cmd[0] in globalvar.grassCmd['script']:
+                cmd[0] += globalvar.EXT_SCT
             self.grass_task = gtask.parse_interface(cmd[0],
                                                     blackList = _blackList)
         except (grass.ScriptError, ValueError), e: 

+ 3 - 1
gui/wxpython/gui_core/prompt.py

@@ -791,7 +791,9 @@ class GPromptSTC(GPrompt, wx.stc.StyledTextCtrl):
         self.SetCurrentPos(pos)
         
         cmd = text.strip().split(' ')[0]
-
+        if sys.platform == "win32" and cmd in globalvar.grassCmd['script']:
+            cmd += globalvar.EXT_SCT
+        
         if not self.cmdDesc or cmd != self.cmdDesc.get_name():
             if cmd in ('r.mapcalc', 'r3.mapcalc') and \
                     self.parent.parent.GetName() == 'LayerManager':