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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 26 17:46:19 EST 2011


Author: annakrat
Date: 2011-11-26 14:46:19 -0800 (Sat, 26 Nov 2011)
New Revision: 49370

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
Log:
wxNviz: miscellaneous bug fixes (merge from trunk 49369)

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2011-11-26 22:35:04 UTC (rev 49369)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2011-11-26 22:46:19 UTC (rev 49370)
@@ -1432,7 +1432,7 @@
                     mapWin.LoadVector(layer)
 
                 # reset view when first layer loaded
-                nlayers = len(mapWin.Map.GetListOfLayers(l_type = ('raster', 'vector'),
+                nlayers = len(mapWin.Map.GetListOfLayers(l_type = ('raster', '3d-raster', 'vector'),
                                                          l_active = True))
                 if nlayers < 2:
                     mapWin.ResetView()

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py	2011-11-26 22:35:04 UTC (rev 49369)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py	2011-11-26 22:46:19 UTC (rev 49370)
@@ -1296,7 +1296,6 @@
             except gcmd.GException, e:
                 GError(parent = self,
                        message = e.value)
-            self.init = False
         
         stop = time.time()
         
@@ -1984,7 +1983,7 @@
             sliceId += 1
                 
         # position
-        if 'update' in data['position']:
+        if 'update' in data['position'] and 'x' in data['position']:
             x = data['position']['x']
             y = data['position']['y']
             z = data['position']['z']

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py	2011-11-26 22:35:04 UTC (rev 49369)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py	2011-11-26 22:46:19 UTC (rev 49370)
@@ -4759,7 +4759,8 @@
                 level = iso['topo']['value']
                 isosurfaces.append("%s %s" % (_("Level"), level))
             box.Set(isosurfaces)
-            box.SetChecked(range(len(isosurfaces)))
+            for i in range(len(isosurfaces)):
+                box.Check(i)
             if data['isosurface']:
                 box.SetSelection(0)
                 self.UpdateVolumeIsosurfPage(data['isosurface'][0])
@@ -4771,7 +4772,8 @@
                 axis = ("X", "Y", "Z")[slice['position']['axis']]
                 slices.append("%s %s" % (_("Slice parallel to"), axis))
             box.Set(slices)
-            box.SetChecked(range(len(slices)))
+            for i in range(len(slices)):
+                box.Check(i)
             if data['slice']:
                 box.SetSelection(0)
                 self.UpdateVolumeSlicePage(data['slice'][0])



More information about the grass-commit mailing list