浏览代码

wxGUI/interface: temporary fix for progressbar

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54010 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 年之前
父节点
当前提交
d386e99489
共有 3 个文件被更改,包括 7 次插入2 次删除
  1. 3 0
      gui/wxpython/lmgr/giface.py
  2. 2 1
      gui/wxpython/vdigit/toolbars.py
  3. 2 1
      gui/wxpython/vdigit/wxdigit.py

+ 3 - 0
gui/wxpython/lmgr/giface.py

@@ -63,3 +63,6 @@ class LayerManagerGrassInterface:
             return self.lmgr.GetMapDisplay(onlyCurrent=True).GetMapWindow()
         else:
             return None
+
+    def GetProgress(self):
+        return self.lmgr.goutput.GetProgressBar()

+ 2 - 1
gui/wxpython/vdigit/toolbars.py

@@ -850,10 +850,11 @@ class VDigitToolbar(BaseToolbar):
                                       0)
             self.digit.CloseMap()
             
+            # TODO: replace by giface
             lmgr = self.parent.GetLayerManager()
             if lmgr:
                 lmgr.toolbars['tools'].Enable('vdigit', enable = True)
-                lmgr.GetLogWindow().GetProgressBar().SetValue(0)
+                lmgr._giface.GetProgress().SetValue(0)
                 lmgr.GetLogWindow().WriteCmdLog(_("Editing of vector map <%s> successfully finished") % \
                                                     self.mapLayer.GetName())
             # re-active layer 

+ 2 - 1
gui/wxpython/vdigit/wxdigit.py

@@ -137,10 +137,11 @@ class IVDigit:
         self.bgMapInfo   = Map_info()
         self.poBgMapInfo = self.popoBgMapInfo = None
         
+        # TODO: replace this by using giface
         if not mapwindow.parent.IsStandalone():
             goutput = mapwindow.parent.GetLayerManager().GetLogWindow()
             log = goutput.GetLog(err = True)
-            progress = goutput.GetProgressBar()
+            progress = mapwindow.parent._giface.GetProgress()
         else:
             log = sys.stderr
             progress = None