[GRASS-SVN] r47103 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jul 13 13:14:53 EDT 2011
Author: annakrat
Date: 2011-07-13 10:14:53 -0700 (Wed, 13 Jul 2011)
New Revision: 47103
Modified:
grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
grass/trunk/gui/wxpython/gui_modules/nviz_tools.py
Log:
wxNviz: update cutting plane page when return to 3D view
Modified: grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py 2011-07-13 12:45:45 UTC (rev 47102)
+++ grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py 2011-07-13 17:14:53 UTC (rev 47103)
@@ -165,6 +165,7 @@
"""!Initialize cutting planes list"""
for i in range(self._display.GetCPlanesCount()):
cplane = copy.deepcopy(UserSettings.Get(group = 'nviz', key = 'cplane'))
+ cplane['on'] = False
self.cplanes.append(cplane)
@@ -818,9 +819,14 @@
for plane in range (self._display.GetCPlanesCount()):
if plane == index:
self._display.SelectCPlane(plane)
+ self.cplanes[plane]['on'] = True
else:
self._display.UnselectCPlane(plane)
-
+ try:
+ self.cplanes[plane]['on'] = False
+ except IndexError:
+ pass
+
def UpdateCPlane(self, event):
"""!Change cutting plane settings"""
current = event.current
Modified: grass/trunk/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz_tools.py 2011-07-13 12:45:45 UTC (rev 47102)
+++ grass/trunk/gui/wxpython/gui_modules/nviz_tools.py 2011-07-13 17:14:53 UTC (rev 47103)
@@ -3808,7 +3808,11 @@
for plane in range(count):
choices.append("%s %i" % (_("Plane"), plane))
self.FindWindowById(self.win['cplane']['planes']).SetItems(choices)
- self.FindWindowById(self.win['cplane']['planes']).SetSelection(0)
+ current = 0
+ for i, cplane in enumerate(self.mapWindow.cplanes):
+ if cplane['on']:
+ current = i + 1
+ self.FindWindowById(self.win['cplane']['planes']).SetSelection(current)
xyRange, zRange = self._display.GetXYRange(), self._display.GetZRange()
if xyRange > 0: # GTK warning
More information about the grass-commit
mailing list