[GRASS-SVN] r42573 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jun 17 11:08:58 EDT 2010
Author: martinl
Date: 2010-06-17 15:08:58 +0000 (Thu, 17 Jun 2010)
New Revision: 42573
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/wxnviz.py
Log:
wxGUI/nviz: minor fixes (missing wx config file)
(merge r42572 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-06-17 15:05:19 UTC (rev 42572)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py 2010-06-17 15:08:58 UTC (rev 42573)
@@ -253,7 +253,7 @@
data['persp']['value'],
data['twist']['value'])
- if event and event.zExag:
+ if event and event.zExag and data['z-exag'].has_key('value'):
self._display.SetZExag(data['z-exag']['value'])
if event:
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py 2010-06-17 15:05:19 UTC (rev 42572)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py 2010-06-17 15:08:58 UTC (rev 42573)
@@ -1268,7 +1268,11 @@
value = UserSettings.Get(group = 'nviz', key = 'view',
subkey = ['height', 'value'], internal = True)
else:
- value = self.mapWindow.view[control]['value']
+ try:
+ value = self.mapWindow.view[control]['value']
+ except KeyError:
+ value = -1
+
self.FindWindowById(win).SetValue(value)
viewWin = self.FindWindowById(self.win['view']['pos'])
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py 2010-06-17 15:05:19 UTC (rev 42572)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py 2010-06-17 15:08:58 UTC (rev 42573)
@@ -184,13 +184,13 @@
# first
Nviz_set_light_position(self.data, 1, 0.68, -0.68, 0.80, 0.0)
Nviz_set_light_bright(self.data, 1, 0.8)
- Nviz_set_light_color(self.data, 1, 255, 255, 255)
+ Nviz_set_light_color(self.data, 1, 1.0, 1.0, 1.0)
Nviz_set_light_ambient(self.data, 1, 0.2, 0.2, 0.2)
# second
Nviz_set_light_position(self.data, 2, 0.0, 0.0, 1.0, 0.0)
Nviz_set_light_bright(self.data, 2, 0.5)
- Nviz_set_light_color(self.data, 2, 255, 255, 255)
+ Nviz_set_light_color(self.data, 2, 1.0, 1.0, 1.0)
Nviz_set_light_ambient(self.data, 2, 0.3, 0.3, 0.3)
Debug.msg(3, "Nviz::SetLightsDefault()")
@@ -204,7 +204,7 @@
@param w local coordinate (default to 0)
"""
Nviz_set_light_position(self.data, lid, x, y, z, w)
- Nviz_set_light_color(self.data, lid, color[0], color[1], color[2])
+ Nviz_set_light_color(self.data, lid, color[0] / 255., color[1] / 255., color[2] / 255.)
Nviz_set_light_bright(self.data, lid, bright)
Nviz_set_light_ambient(self.data, lid, ambient, ambient, ambient)
More information about the grass-commit
mailing list