[GRASS-SVN] r43141 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 16 10:44:12 EDT 2010


Author: martinl
Date: 2010-08-16 14:44:11 +0000 (Mon, 16 Aug 2010)
New Revision: 43141

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
Log:
wxGUI/Nviz: fix vector lines
(merge r43140 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py	2010-08-16 13:32:03 UTC (rev 43140)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py	2010-08-16 14:44:11 UTC (rev 43141)
@@ -502,7 +502,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']
@@ -681,14 +682,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/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py	2010-08-16 13:32:03 UTC (rev 43140)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py	2010-08-16 14:44:11 UTC (rev 43141)
@@ -2601,13 +2601,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/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2010-08-16 13:32:03 UTC (rev 43140)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2010-08-16 14:44:11 UTC (rev 43141)
@@ -1439,6 +1439,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