浏览代码

wxGUI: check if map exists, README updated (nviz pythonized)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@43468 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 年之前
父节点
当前提交
5f449c6172
共有 2 个文件被更改,包括 16 次插入8 次删除
  1. 9 6
      gui/wxpython/README
  2. 7 2
      gui/wxpython/gui_modules/utils.py

+ 9 - 6
gui/wxpython/README

@@ -1,5 +1,5 @@
-wxPython GRASS Graphical User Interface
-=======================================
+wxPython GRASS Graphical User Interface (wxGUI)
+===============================================
 
 $Date$
 
@@ -138,9 +138,12 @@ environment variable, e.g.
 $ export GRASS_WX_DEBUG=3
 
 
-6 - EXTENSIONS - VECTOR DIGITIZER AND 3D VIEWER
+6 - VECTOR DIGITIZER
 
-To enable digitizer you need to compile 'vdigit' or 'nviz'
-component. Note that you must configure GRASS with C++ (--with-cxx),
-Python (--with-python) and wxWidgets (--with-wxwidgets) support.
+To enable digitizer you need to compile 'vdigit' component. Note that
+you must configure GRASS with C++ (--with-cxx), Python (--with-python)
+and wxWidgets (--with-wxwidgets) support.
 
+$ cd gui/wxpython/vdigit
+$ make
+$ make install

+ 7 - 2
gui/wxpython/gui_modules/utils.py

@@ -268,10 +268,15 @@ def GetVectorNumberOfLayers(vector):
     if not vector:
         return layers
     
+    fullname = grass.find_file(name = vector, element = 'vector')['fullname']
+    if not fullname:
+        Debug.msg(5, "utils.GetVectorNumberOfLayers(): vector map '%s' not found" % vector)
+        return layers
+    
     ret = gcmd.RunCommand('v.db.connect',
                           flags = 'g',
                           read = True,
-                          map = vector,
+                          map = fullname,
                           fs = ';')
         
     if not ret:
@@ -287,7 +292,7 @@ def GetVectorNumberOfLayers(vector):
             pass
     
     Debug.msg(3, "utils.GetVectorNumberOfLayers(): vector=%s -> %s" % \
-                  (vector, ','.join(layers)))
+                  (fullname, ','.join(layers)))
     
     return layers