[GRASS-SVN] r43140 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 16 09:32:03 EDT 2010


Author: martinl
Date: 2010-08-16 13:32:03 +0000 (Mon, 16 Aug 2010)
New Revision: 43140

Modified:
   grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
   grass/trunk/gui/wxpython/gui_modules/nviz_tools.py
   grass/trunk/gui/wxpython/gui_modules/toolbars.py
Log:
wxGUI/Nviz: fix vector lines


Modified: grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py	2010-08-16 13:01:56 UTC (rev 43139)
+++ grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py	2010-08-16 13:32:03 UTC (rev 43140)
@@ -503,7 +503,8 @@
         type = self.tree.GetPyData(item)[0]['maplayer'].type
         # reference to original layer properties (can be None)
         data = self.tree.GetPyData(item)[0]['nviz']
-        if data is None:
+        
+        if not data:
             # init data structure
             self.tree.GetPyData(item)[0]['nviz'] = {}
             data = self.tree.GetPyData(item)[0]['nviz']
@@ -682,14 +683,6 @@
         if layer.type !=  'vector':
             return
         
-        # if vecType is None:
-        #     # load data type by default
-        #     vecType = []
-        #     for v in ('lines', 'points'):
-        #         if UserSettings.Get(group = 'nviz', key = 'vector',
-        #                             subkey = [v, 'show']):
-        #             vecType.append(v)
-        
         # set default properties
         if points is None:
             self.SetMapObjProperties(item, -1, 'lines')

Modified: grass/trunk/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz_tools.py	2010-08-16 13:01:56 UTC (rev 43139)
+++ grass/trunk/gui/wxpython/gui_modules/nviz_tools.py	2010-08-16 13:32:03 UTC (rev 43140)
@@ -2600,13 +2600,14 @@
                 mapIs3D = int(value)
             elif key == 'points':
                 npoints = int(value)
-                nprimitives = npoints
-            elif key in ('lines',
-                         'boundaries',
+                nprimitives += npoints
+            elif key == 'lines':
+                nlines = int(value)
+                nprimitives += nlines
+            elif key in ('boundaries',
                          'centroids',
                          'faces',
                          'kernels'):
-                nlines = int(value)
                 nprimitives += int(value)
         
         return (npoints, nlines, nprimitives, mapIs3D)

Modified: grass/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py	2010-08-16 13:01:56 UTC (rev 43139)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py	2010-08-16 13:32:03 UTC (rev 43140)
@@ -1584,6 +1584,7 @@
             event.Skip()
             return
         
+        self.lmgr.notebook.SetSelection(3)
         eId = event.GetId()
         if eId == self.view:
             self.lmgr.nviz.SetPage('view')



More information about the grass-commit mailing list