浏览代码

wxGUI: bugfix for trac https://trac.osgeo.org/grass/ticket/176 (merge from devbr6, https://trac.osgeo.org/grass/changeset/31508)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@31509 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 17 年之前
父节点
当前提交
6090a211b3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      gui/wxpython/gui_modules/goutput.py

+ 2 - 2
gui/wxpython/gui_modules/goutput.py

@@ -396,8 +396,8 @@ class GMStderr:
 
             if 'GRASS_INFO_PERCENT' in line:
                 # 'GRASS_INFO_PERCENT: 10' -> value=10
-                value = int(line.split(':')[1].strip())
-                if value < 100:
+                value = int(line.rsplit(':', 1)[1].strip())
+                if value >= 0 and value < 100:
                     self.gmgauge.SetValue(value)
                 else:
                     self.gmgauge.SetValue(0) # reset progress bar on '0%'