[GRASS-SVN] r56122 - grass/branches/develbranch_6/gui/wxpython/nviz
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 4 11:43:38 PDT 2013
Author: annakrat
Date: 2013-05-04 11:43:37 -0700 (Sat, 04 May 2013)
New Revision: 56122
Modified:
grass/branches/develbranch_6/gui/wxpython/nviz/mapwindow.py
grass/branches/develbranch_6/gui/wxpython/nviz/tools.py
Log:
wxGUI: attempt to fix #1961
Modified: grass/branches/develbranch_6/gui/wxpython/nviz/mapwindow.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/nviz/mapwindow.py 2013-05-04 17:13:49 UTC (rev 56121)
+++ grass/branches/develbranch_6/gui/wxpython/nviz/mapwindow.py 2013-05-04 18:43:37 UTC (rev 56122)
@@ -1791,7 +1791,9 @@
subkey = ('z-exag', 'max'))
if zexagMax <= self.view['z-exag']['value']:
self.view['z-exag']['max'] = self.view['z-exag']['value'] * 2
- elif self.view['z-exag']['value'] < 1:
+ elif self.view['z-exag']['value'] < 1:
+ if self.view['z-exag']['value'] == 0:
+ self.view['z-exag']['value'] = 1
self.view['z-exag']['max'] = 10 * self.view['z-exag']['value']
else:
self.view['z-exag']['max'] = zexagMax
Modified: grass/branches/develbranch_6/gui/wxpython/nviz/tools.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/nviz/tools.py 2013-05-04 17:13:49 UTC (rev 56121)
+++ grass/branches/develbranch_6/gui/wxpython/nviz/tools.py 2013-05-04 18:43:37 UTC (rev 56122)
@@ -4227,10 +4227,16 @@
zmin = self.mapWindow.view['z-exag']['min']
zmax = self.mapWindow.view['z-exag']['max']
zval = self.mapWindow.view['z-exag']['value']
-
+
for control in ('slider','text'):
- self.FindWindowById(self.win['view']['height'][control]).SetRange(
- hmin,hmax)
+ try:
+ self.FindWindowById(self.win['view']['height'][control]).SetRange(
+ hmin, hmax)
+ except OverflowError:
+ hmin = self.mapWindow.iview['height']['min'] = 0
+ hmax = self.mapWindow.iview['height']['max'] = 10000
+ hval = self.mapWindow.iview['height']['value'] = 5000
+ self.FindWindowById(self.win['view']['height'][control]).SetRange(hmin, hmax)
self.FindWindowById(self.win['view']['z-exag'][control]).SetRange(
zmin, zmax)
self.FindWindowById(self.win['view']['height'][control]).SetValue(hval)
More information about the grass-commit
mailing list