[GRASS-SVN] r43470 - in grass/branches/develbranch_6/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 15 16:41:04 EDT 2010


Author: martinl
Date: 2010-09-15 20:41:04 +0000 (Wed, 15 Sep 2010)
New Revision: 43470

Modified:
   grass/branches/develbranch_6/gui/wxpython/README
   grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py
Log:
wxGUI: check if map exists, README updated (nviz pythonized)
(merge r43468 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/README
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/README	2010-09-15 20:39:49 UTC (rev 43469)
+++ grass/branches/develbranch_6/gui/wxpython/README	2010-09-15 20:41:04 UTC (rev 43470)
@@ -1,5 +1,5 @@
-wxPython GRASS Graphical User Interface
-=======================================
+wxPython GRASS Graphical User Interface (wxGUI)
+===============================================
 
 $Date$
 
@@ -138,9 +138,12 @@
 $ 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

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py	2010-09-15 20:39:49 UTC (rev 43469)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py	2010-09-15 20:41:04 UTC (rev 43470)
@@ -261,10 +261,15 @@
     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:
@@ -280,7 +285,7 @@
             pass
     
     Debug.msg(3, "utils.GetVectorNumberOfLayers(): vector=%s -> %s" % \
-                  (vector, ','.join(layers)))
+                  (fullname, ','.join(layers)))
     
     return layers
 



More information about the grass-commit mailing list