[GRASS-SVN] r43007 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 4 16:34:56 EDT 2010
Author: martinl
Date: 2010-08-04 20:34:56 +0000 (Wed, 04 Aug 2010)
New Revision: 43007
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
Log:
wxGUI/nviz: some workspace-related fixes
(merge r43004 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-04 20:33:40 UTC (rev 43006)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py 2010-08-04 20:34:56 UTC (rev 43007)
@@ -422,7 +422,7 @@
# if data['vector'][v]:
# vecType.append(v)
layer = self.tree.GetPyData(item)[0]['maplayer']
- npoints, nlines, nfeatures = self.lmgr.nviz.VectorInfo(layer)
+ npoints, nlines, nfeatures, mapIs3D = self.lmgr.nviz.VectorInfo(layer)
if npoints > 0:
self.LoadVector(item, points = True)
if nlines > 0:
@@ -462,7 +462,8 @@
for v in ('lines', 'points'):
if data['vector'][v]:
vecType.append(v)
- self.UnloadVector(layer, vecType)
+ self.UnloadVector(layer, True)
+ self.UnloadVector(layer, False)
self.UpdateView(None)
except gcmd.GException, e:
@@ -743,7 +744,7 @@
if not data[vecType].has_key('object'):
continue
- id = data[vtype]['object']['id']
+ id = data[vecType]['object']['id']
if vecType == 'lines':
ret = self._display.UnloadVector(id, False)
@@ -751,10 +752,10 @@
ret = self._display.UnloadVector(id, True)
if ret == 0:
print >> sys.stderr, "Nviz:" + _("Unable to unload vector map <%(name)s> (%(type)s)") % \
- { 'name': layer.name, 'type' : vtype }
+ { 'name': layer.name, 'type' : vecType }
else:
print "Nviz:" + _("Vector map <%(name)s> (%(type)s) unloaded successfully") % \
- { 'name' : layer.name, 'type' : vtype }
+ { 'name' : layer.name, 'type' : vecType }
data[vecType].pop('object')
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-04 20:33:40 UTC (rev 43006)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py 2010-08-04 20:34:56 UTC (rev 43007)
@@ -1972,11 +1972,9 @@
winId = event.GetId()
if winId == self.win['vector']['lines']['show']:
vecType = 'lines'
- lines = True
points = False
else: # points
vecType = 'points'
- lines = False
points = True
checked = event.IsChecked()
@@ -1985,9 +1983,9 @@
data = self.GetLayerData('vector')['vector']
if checked:
- self.mapWindow.LoadVector(item, lines = lines, points = points)
+ self.mapWindow.LoadVector(item, points = points)
else:
- self.mapWindow.UnloadVector(item, lines = lines, points = points)
+ self.mapWindow.UnloadVector(item, points = points)
self.UpdateVectorShow(vecType, checked)
@@ -2611,11 +2609,11 @@
nlines = int(value)
nprimitives += int(value)
- return (npoints, nlines, nprimitives)
+ return (npoints, nlines, nprimitives, mapIs3D)
def UpdateVectorPage(self, layer, data, updateName = True):
"""!Update vector page"""
- npoints, nlines, nfeatures = self.VectorInfo(layer)
+ npoints, nlines, nfeatures, mapIs3D = self.VectorInfo(layer)
if mapIs3D:
desc = _("Vector map is 3D")
enable = False
More information about the grass-commit
mailing list