浏览代码

wxGUI: do not import tgis during gui start (https://trac.osgeo.org/grass/ticket/2188)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58883 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 年之前
父节点
当前提交
859af98c28
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gui/wxpython/gui_core/gselect.py

+ 2 - 1
gui/wxpython/gui_core/gselect.py

@@ -56,7 +56,6 @@ try:
 except ImportError, e:
     print >> sys.stderr, _("Unable to import pyGRASS: %s\n"
                            "Some functionality will be not accessible") % e
-import grass.temporal as tgis
 
 from gui_core.widgets  import ManageSettingsWidget
 
@@ -449,6 +448,7 @@ class TreeCtrlComboPopup(ListCtrlComboPopup):
         
         if element in ('stds', 'strds', 'str3ds', 'stvds'):
             if self.tgis_error is False:
+                import grass.temporal as tgis
                 filesdict = tgis.tlist_grouped(elementdict[element], element == 'stds')
             else:
                 filesdict = None
@@ -673,6 +673,7 @@ class TreeCtrlComboPopup(ListCtrlComboPopup):
             if self.type in ('stds', 'strds', 'str3ds', 'stvds'):
                 # Initiate the temporal framework. Catch database error
                 # and set the error flag for the stds listing.
+                import grass.temporal as tgis
                 try:
                     tgis.init(True)
                 except messages.FatalError, e: