[GRASS-SVN] r42961 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Aug 2 06:28:40 EDT 2010
Author: martinl
Date: 2010-08-02 10:28:40 +0000 (Mon, 02 Aug 2010)
New Revision: 42961
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
Log:
wxGUI: various nviz related fixes
(merge r42960 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py 2010-08-02 10:24:53 UTC (rev 42960)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py 2010-08-02 10:28:40 UTC (rev 42961)
@@ -399,7 +399,7 @@
cmd = ['r.info']
elif mltype == 'vector':
cmd = ['v.info']
- cmd.append('map=%s' % mapLayer.name)
+ cmd.append('map=%s' % mapLayer.GetName())
# print output to command log area
self.lmgr.goutput.RunCmd(cmd, switchPage=True)
@@ -410,7 +410,7 @@
cmd = ['g.region',
'-p',
- 'zoom=%s' % mapLayer.name]
+ 'zoom=%s' % mapLayer.GetName()]
# print output to command log area
self.lmgr.goutput.RunCmd(cmd)
@@ -425,11 +425,11 @@
mltype = self.GetPyData(layer)[0]['type']
if mltype == 'raster':
- rast.append(mapLayer.name)
+ rast.append(mapLayer.GetName())
elif mltype == 'vector':
- vect.append(mapLayer.name)
+ vect.append(mapLayer.GetName())
elif mltype == '3d-raster':
- rast3d.append(mapLayer.name)
+ rast3d.append(mapLayer.GetName())
cmd = ['g.region']
if rast:
@@ -447,7 +447,7 @@
def OnProfile(self, event):
"""!Plot profile of given raster map layer"""
mapLayer = self.GetPyData(self.layer_selected)[0]['maplayer']
- if not mapLayer.name:
+ if not mapLayer.GetName():
wx.MessageBox(parent=self,
message=_("Unable to create profile of "
"raster map."),
@@ -463,13 +463,13 @@
if not self.profileFrame:
self.profileFrame = profile.ProfileFrame(self.mapdisplay,
id=wx.ID_ANY, pos=wx.DefaultPosition, size=(700,300),
- style=wx.DEFAULT_FRAME_STYLE, rasterList=[mapLayer.name])
+ style=wx.DEFAULT_FRAME_STYLE, rasterList=[mapLayer.GetName()])
# show new display
self.profileFrame.Show()
def OnColorTable(self, event):
"""!Set color table for raster map"""
- name = self.GetPyData(self.layer_selected)[0]['maplayer'].name
+ name = self.GetPyData(self.layer_selected)[0]['maplayer'].GetName()
menuform.GUI().ParseCommand(['r.colors',
'map=%s' % name],
parentframe=self)
@@ -479,7 +479,7 @@
Plot histogram for given raster map layer
"""
mapLayer = self.GetPyData(self.layer_selected)[0]['maplayer']
- if not mapLayer.name:
+ if not mapLayer.GetName():
wx.MessageBox(parent=self,
message=_("Unable to display histogram of "
"raster map."),
@@ -500,7 +500,7 @@
# show new display
self.histogramFrame.Show()
- self.histogramFrame.SetHistLayer(mapLayer.name)
+ self.histogramFrame.SetHistLayer(mapLayer.GetName())
self.histogramFrame.HistWindow.UpdateHist()
self.histogramFrame.Refresh()
self.histogramFrame.Update()
@@ -1053,24 +1053,13 @@
self.mapdisplay.MapWindow.UnloadRaster3d(item)
elif mapLayer.type == 'vector':
self.mapdisplay.MapWindow.UnloadVector(item)
-
- if hasattr(self.parent, "nviz"):
- toolWin = self.lmgr.nviz
- # remove vector page
- if toolWin.notebook.GetSelection() == toolWin.page['vector']['id']:
- toolWin.notebook.RemovePage(toolWin.page['vector']['id'])
- toolWin.page['vector']['id'] = -1
- toolWin.page['settings']['id'] = 1
-
+
self.mapdisplay.SetStatusText("", 0)
# redraw map if auto-rendering is enabled
self.rerender = True
self.reorder = True
- #if self.mapdisplay.statusbarWin['render'].GetValue():
- # print "*** Checked OnRender *****"
- # self.mapdisplay.OnRender(None)
-
+
def OnCmdChanged(self, event):
"""!Change command string"""
ctrl = event.GetEventObject().GetId()
@@ -1503,4 +1492,4 @@
item = self.GetNextSibling(item)
return None
-
+
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py 2010-08-02 10:24:53 UTC (rev 42960)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py 2010-08-02 10:28:40 UTC (rev 42961)
@@ -153,6 +153,34 @@
def OnZoomToRaster(self, event):
pass
+ def GetLayerByName(self, name, mapType, dataType = 'layer'):
+ """!Get layer from layer tree by nam
+
+ @param name layer name
+ @param type 'item' / 'layer' / 'nviz'
+
+ @return layer / map layer properties / nviz properties
+ @return None
+ """
+ if not self.tree:
+ return None
+
+ try:
+ mapLayer = self.Map.GetListOfLayers(l_type = mapType, l_name = name)[0]
+ except IndexError:
+ return None
+
+ if dataType == 'layer':
+ return mapLayer
+
+ item = self.tree.FindItemByData('maplayer', mapLayer)
+ if not item:
+ return None
+ if dataType == 'nviz':
+ return self.tree.GetPyData(item)[0]['nviz']
+
+ return item
+
def GetSelectedLayer(self, type = 'layer', multi = False):
"""!Get selected layer from layer tree
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-02 10:24:53 UTC (rev 42960)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py 2010-08-02 10:28:40 UTC (rev 42961)
@@ -713,7 +713,7 @@
toolWin = self.lmgr.nviz
toolWin.UpdatePage('vector')
- toolWin.SetPage('vector')
+ ### toolWin.SetPage('vector')
return id
@@ -754,16 +754,6 @@
### self.layers.remove(id)
- # update tools window
- if hasattr(self.lmgr, "nviz") and \
- vecType is None:
- toolWin = self.lmgr.nviz
- # remove surface page
- if toolWin.GetSelection() == toolWin.page['surface']['id']:
- toolWin.RemovePage(toolWin.page['surface']['id'])
- toolWin.page['surface']['id'] = -1
- toolWin.page['settings']['id'] = 1
-
def Reset(self):
"""!Reset (unload data)"""
for item in self.layers:
@@ -1081,18 +1071,6 @@
return layerName
- def GetLayerData(self, type, name):
- """!Return layer item data
-
- @return {} if no layer item found
- """
- for item in self.layers:
- mapLayer = self.tree.GetPyData(item)[0]['maplayer'].GetName()
- if mapLayer == name:
- return self.tree.GetPyData(item)[0]['nviz']
-
- return {}
-
def GetLayerId(self, type, name):
"""!Get layer object id or -1"""
if len(name) < 1:
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-02 10:24:53 UTC (rev 42960)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py 2010-08-02 10:28:40 UTC (rev 42961)
@@ -22,6 +22,7 @@
import os
import sys
import copy
+import types
import wx
import wx.lib.colourselect as csel
@@ -263,13 +264,18 @@
# surface page
self.notebookData.AddPage(page = self._createSurfacePage(),
text = " %s " % _("Surface"))
+ self.EnablePage('surface', False)
+
# vector page
self.notebookData.AddPage(page = self._createVectorPage(),
text = " %s " % _("Vector"))
+ self.EnablePage('vector', False)
+
# volume page
self.notebookData.AddPage(page = self._createVolumePage(),
text = " %s " % _("Volume"))
-
+ self.EnablePage('volume', False)
+
return self.notebookData
def _createAppearancePage(self):
@@ -346,6 +352,7 @@
pos = (row, 0), flag = wx.ALIGN_CENTER_VERTICAL)
use = wx.Choice (parent = panel, id = wx.ID_ANY, size = (100, -1),
choices = [_("map")])
+
if code not in ('topo', 'color', 'shine'):
use.Insert(item = _("unset"), pos = 0)
self.win['surface'][code]['required'] = False
@@ -1309,13 +1316,25 @@
panel.SetSizer(pageSizer)
return panel
+
+ def GetLayerData(self, nvizType):
+ """!Get nviz data"""
+ name = self.FindWindowById(self.win[nvizType]['map']).GetValue()
+ if nvizType == 'surface':
+ return self.mapWindow.GetLayerByName(name, mapType = 'raster', dataType = 'nviz')
+ elif nvizType == 'vector':
+ return self.mapWindow.GetLayerByName(name, mapType = 'vector', dataType = 'nviz')
+ elif nvizType == 'volume':
+ return self.mapWindow.GetLayerByName(name, mapType = 'raster3d', dataType = 'nviz')
+
+ return None
def OnFringe(self, event):
"""!Show/hide fringe"""
enabled = event.IsChecked()
win = self.FindWindowById(event.GetId())
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['surface']
+ data = self.GetLayerData('surface')['surface']
sid = data['object']['id']
elev = self.FindWindowById(self.win['fringe']['elev']).GetValue()
color = self.FindWindowById(self.win['fringe']['color']).GetValue()
@@ -1475,35 +1494,41 @@
"""!Raster map selected, update surface page"""
name = event.GetString()
try:
- layer = self.mapWindow.Map.GetListOfLayers(l_type = 'raster', l_name = name)[0]
- except IndexError:
+ data = self.mapWindow.GetLayerByName(name, mapType = 'raster', dataType = 'nviz')['surface']
+ except:
+ self.EnablePage('surface', False)
return
- data = self.mapWindow.GetLayerData(type = 'raster', name = name)['surface']
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'raster')
self.UpdateSurfacePage(layer, data, updateName = False)
-
+ self.EnablePage('surface', True)
+
def OnSetVector(self, event):
- """!Vector map selected, update surface page"""
+ """!Vector map selected, update properties page"""
name = event.GetString()
try:
- layer = self.mapWindow.Map.GetListOfLayers(l_type = 'vector', l_name = name)[0]
- except IndexError:
+ data = self.mapWindow.GetLayerByName(name, mapType = 'vector', dataType = 'nviz')['vector']
+ except:
+ self.EnablePage('vector', False)
return
- data = self.mapWindow.GetLayerData(type = 'vector', name = name)['vector']
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'vector')
self.UpdateVectorPage(layer, data, updateName = False)
+ self.EnablePage('vector', True)
def OnSetRaster3D(self, event):
"""!3D Raster map selected, update surface page"""
name = event.GetString()
try:
- layer = self.mapWindow.Map.GetListOfLayers(l_type = 'raster3d', l_name = name)[0]
- except IndexError:
+ data = self.mapWindow.GetLayerByName(name, mapType = 'raster3d', dataType = 'nviz')['surface']
+ except:
+ self.EnablePage('volume', False)
return
- data = self.mapWindow.GetLayerData(type = 'raster3d', name = name)
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'raster3d')
self.UpdateVolumePage(layer, data, updateName = False)
-
+ self.EnablePage('volume', True)
+
def OnViewChange(self, event):
"""!Change view, render in quick mode"""
# find control
@@ -1632,12 +1657,14 @@
self.SetMapObjUseMap(nvizType = nvizType,
attrb = attrb, map = useMap)
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ name = self.FindWindowById(self.win[nvizType]['map']).GetValue()
if nvizType == 'surface':
+ data = self.mapWindow.GetLayerByName(name, mapType = 'raster', dataType = 'nviz')
data[nvizType]['attribute'][attrb] = { 'map' : useMap,
'value' : str(value),
'update' : None }
else: # volume / isosurface
+ data = self.mapWindow.GetLayerByName(name, mapType = 'raster3d', dataType = 'nviz')
list = self.FindWindowById(self.win['volume']['isosurfs'])
id = list.GetSelection()
data[nvizType]['isosurface'][id][attrb] = { 'map' : useMap,
@@ -1651,6 +1678,19 @@
if self.mapDisplay.statusbarWin['render'].IsChecked():
self.mapWindow.Refresh(False)
+ def EnablePage(self, name, enabled = True):
+ """!Enable/disable all widgets on page"""
+ for key, item in self.win[name].iteritems():
+ if key == 'map':
+ continue
+ if type(item) == types.DictType:
+ for sitem in self.win[name][key].itervalues():
+ if type(sitem) == types.IntType:
+ self.FindWindowById(sitem).Enable(enabled)
+ else:
+ if type(item) == types.IntType:
+ self.FindWindowById(item).Enable(enabled)
+
def SetMapObjUseMap(self, nvizType, attrb, map = None):
"""!Update dialog widgets when attribute type changed"""
if attrb in ('topo', 'color', 'shine'):
@@ -1712,12 +1752,14 @@
useMap = False
if not self.pageChanging:
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ name = self.FindWindowById(self.win[nvizType]['map']).GetValue()
if nvizType == 'surface':
+ data = self.mapWindow.GetLayerByName(name, mapType = 'raster', dataType = 'nviz')
data[nvizType]['attribute'][attrb] = { 'map' : useMap,
'value' : str(value),
'update' : None }
- else: # volume / isosurface
+ else:
+ data = self.mapWindow.GetLayerByName(name, mapType = 'raster3d', dataType = 'nviz')
list = self.FindWindowById(self.win['volume']['isosurfs'])
id = list.GetSelection()
data[nvizType]['isosurface'][id][attrb] = { 'map' : useMap,
@@ -1743,7 +1785,7 @@
coarse = self.FindWindowById(self.win['surface']['draw']['res-coarse']).GetValue()
fine = self.FindWindowById(self.win['surface']['draw']['res-fine']).GetValue()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ data = self.GetLayerData('surface')
data['surface']['draw']['resolution'] = { 'coarse' : coarse,
'fine' : fine,
'update' : None }
@@ -1780,7 +1822,7 @@
"""!Set draw mode"""
value, desc = self.SetSurfaceMode()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ data = self.GetLayerData('surface')
data['surface']['draw']['mode'] = { 'value' : value,
'desc' : desc,
'update' : None }
@@ -1801,7 +1843,7 @@
cvalue = self._getColorString(color)
for name in self.mapWindow.GetLayerNames(type = 'raster'):
- data = self.mapWindow.GetLayerData(type = 'raster', name = name)
+ data = self.GetLayerData('surface')
if not data:
continue # shouldy no happen
@@ -1827,7 +1869,7 @@
def OnSurfaceWireColor(self, event):
"""!Set wire color"""
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ data = self.GetLayerData('surface')
value = self._getColorString(event.GetValue())
data['surface']['draw']['wire-color'] = { 'value' : value,
'update' : None }
@@ -1841,8 +1883,7 @@
def OnSurfaceAxis(self, event):
"""!Surface position, axis changed"""
- mapLayer = self.mapWindow.GetSelectedLayer()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ data = self.GetLayerData('surface')
id = data['surface']['object']['id']
axis = self.FindWindowById(self.win['surface']['position']['axis']).GetSelection()
@@ -1875,8 +1916,7 @@
else:
self.FindWindowById(win).SetValue(value)
- mapLayer = self.mapWindow.GetSelectedLayer()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ data = self.GetLayerData('surface')
id = data['surface']['object']['id']
x, y, z = self._display.GetSurfacePosition(id)
@@ -1887,7 +1927,7 @@
else: # z
z = value
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ data = self.GetLayerData('surface')
data['surface']['position']['x'] = x
data['surface']['position']['y'] = y
data['surface']['position']['z'] = z
@@ -1934,8 +1974,9 @@
vecType = 'points'
checked = event.IsChecked()
- item = self.mapWindow.GetSelectedLayer(type = 'item')
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['vector']
+ name = self.FindWindowById(self.win['vector']['map']).GetValue()
+ item = self.mapWindow.GetLayerByName(name, mapType = 'vector', dataType = 'item')
+ data = self.GetLayerData('vector')['vector']
if checked:
self.mapWindow.LoadVector(item, (vecType,))
@@ -1973,7 +2014,7 @@
self.FindWindowById(self.win['vector']['lines']['surface']).Enable(True)
# set first found surface
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ data = self.GetLayerData('vector')
data['vector']['lines']['mode']['surface'] = rasters[0]
self.FindWindowById(self.win['vector']['lines']['surface']).SetStringSelection( \
rasters[0])
@@ -1986,8 +2027,7 @@
def OnVectorLines(self, event):
"""!Set vector lines mode, apply changes if auto-rendering is enabled"""
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
-
+ data = self.GetLayerData('vector')
width = self.FindWindowById(self.win['vector']['lines']['width']).GetValue()
mode = {}
@@ -2035,8 +2075,8 @@
# spin
win = self.FindWindowById(self.win['vector'][vtype]['height']['slider'])
win.SetValue(value)
-
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['vector'][vtype]
+
+ data = self.GetLayerData('vector')['vector'][vtype]
data['height'] = { 'value' : value,
'update' : None }
@@ -2079,7 +2119,7 @@
vtype = 'lines'
else:
vtype = 'points'
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ data = self.GetLayerData('vector')
data['vector'][vtype]['mode']['surface'] = { 'value' : event.GetString(),
'update' : None }
@@ -2092,7 +2132,7 @@
def OnVectorPoints(self, event):
"""!Set vector points mode, apply changes if auto-rendering is enabled"""
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
+ data = self.GetLayerData('vector')
size = self.FindWindowById(self.win['vector']['points']['size']).GetValue()
marker = self.FindWindowById(self.win['vector']['points']['marker']).GetSelection()
@@ -2157,8 +2197,7 @@
def SetIsosurfaceMode(self, selection):
"""!Set isosurface draw mode"""
- layer = self.mapWindow.GetSelectedLayer()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['volume']
+ data = self.GetLayerData('volume')['volume']
id = data['object']['id']
mode = 0
@@ -2178,12 +2217,7 @@
def SetIsosurfaceResolution(self, res):
"""!Set isosurface draw resolution"""
- layer = self.mapWindow.GetSelectedLayer()
- try:
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['volume']
- except:
- # no volume layer
- return
+ data = self.GetLayerData('volume')['volume']
id = data['object']['id']
self._display.SetIsosurfaceRes(id, res)
@@ -2199,7 +2233,8 @@
"""!Isosurface checked (->load) or unchecked (->unload)"""
index = event.GetSelection()
list = self.FindWindowById(self.win['volume']['isosurfs'])
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['volume']
+
+ data = self.GetLayerData('volume')['volume']
id = data['object']['id']
isosurfId = event.GetSelection()
@@ -2233,8 +2268,9 @@
winUp.Enable()
# update dialog
- layer = self.mapWindow.GetSelectedLayer()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['volume']['isosurface'][selection]
+ name = self.FindWindowById(self.win['volume']['map']).GetValue()
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'raster3d')
+ data = self.GetLayerData('volume')['volume']['isosurface'][selection]
self.UpdateVolumeIsosurfPage(layer, data)
@@ -2254,8 +2290,9 @@
list.Check(item)
list.SetSelection(item)
- layer = self.mapWindow.GetSelectedLayer()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['volume']
+ name = self.FindWindowById(self.win['volume']['map']).GetValue()
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'raster3d')
+ data = self.GetLayerData('volume')['volume']
id = data['object']['id']
# collect properties
@@ -2314,8 +2351,10 @@
if list.GetCount() > 0:
list.SetSelection(list.GetCount()-1)
- layer = self.mapWindow.GetSelectedLayer()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['volume']
+ name = self.FindWindowById(self.win['volume']['map']).GetValue()
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'raster3d')
+ data = self.GetLayerData('volume')['volume']
+
id = data['object']['id']
# delete isosurface
@@ -2339,8 +2378,10 @@
if sel < 1:
return # this should not happen
- layer = self.mapWindow.GetSelectedLayer()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['volume']
+ name = self.FindWindowById(self.win['volume']['map']).GetValue()
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'raster3d')
+ data = self.GetLayerData('volume')['volume']
+
id = data['object']['id']
# move item up
@@ -2369,8 +2410,10 @@
if sel >= list.GetCount() - 1:
return # this should not happen
- layer = self.mapWindow.GetSelectedLayer()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')['volume']
+ name = self.FindWindowById(self.win['volume']['map']).GetValue()
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'raster3d')
+ data = self.GetLayerData('volume')['volume']
+
id = data['object']['id']
# move item up
@@ -2394,8 +2437,6 @@
def UpdatePage(self, pageId):
"""!Update dialog (selected page)"""
self.pageChanging = True
- layer = self.mapWindow.GetSelectedLayer()
- data = self.mapWindow.GetSelectedLayer(type = 'nviz')
Debug.msg(1, "NvizToolWindow.UpdatePage(): %s", pageId)
if pageId == 'view':
@@ -2416,15 +2457,16 @@
self.FindWindowById(self.win['view']['z-exag'][control]).SetValue(zval)
elif pageId in ('surface', 'vector', 'volume'):
- current_page = self.GetSelection()
- if self.GetSelection() != self.page[pageId]['id']:
- self.SetSelection(self.page[pageId]['id'])
-
+ name = self.FindWindowById(self.win[pageId]['map']).GetValue()
+ data = self.GetLayerData(pageId)
if pageId == 'surface':
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'raster')
self.UpdateSurfacePage(layer, data['surface'])
elif pageId == 'vector':
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'vector')
self.UpdateVectorPage(layer, data['vector'])
elif pageId == 'volume':
+ layer = self.mapWindow.GetLayerByName(name, mapType = 'raster3d')
self.UpdateVectorPage(layer, data['vector'])
elif pageId == 'light':
zval = self.mapWindow.light['position']['z']
@@ -2435,9 +2477,8 @@
self.FindWindowById(self.win['light']['bright'][control]).SetValue(bval)
self.FindWindowById(self.win['light']['ambient'][control]).SetValue(aval)
elif pageId == 'fringe':
- mapLayer = self.mapWindow.GetSelectedLayer()
win = self.FindWindowById(self.win['fringe']['surface'])
- win.SetValue(mapLayer.GetName())
+ win.SetValue(self.FindWindowById(self.win['raster']['map']).GetValue())
self.Update()
self.pageChanging = False
More information about the grass-commit
mailing list