소스 검색

wxGUI: add set_raise_on_error(True) to prevent crashing gui when using grass.mapcalc

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63292 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 년 전
부모
커밋
2437e7dc1e
2개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      gui/wxpython/mapdisp/main.py
  2. 2 0
      gui/wxpython/wxgui.py

+ 1 - 0
gui/wxpython/mapdisp/main.py

@@ -349,6 +349,7 @@ class MapApp(wx.App):
         if not globalvar.CheckWxVersion([2, 9]):
             wx.InitAllImageHandlers()
 
+        grass.set_raise_on_error(True)
         # actual use of StandaloneGrassInterface not yet tested
         # needed for adding functionality in future
         giface = DMonGrassInterface(None)

+ 2 - 0
gui/wxpython/wxgui.py

@@ -26,6 +26,7 @@ from core import globalvar
 from core.utils import _
 
 from grass.exceptions import Usage
+from grass.script.core import set_raise_on_error
 
 import wx
 try:
@@ -133,6 +134,7 @@ def main(argv = None):
     app = GMApp(workspaceFile)
     # suppress wxPython logs
     q = wx.LogNull()
+    set_raise_on_error(True)
 
     app.MainLoop()