[GRASS-SVN] r57697 - grass/branches/develbranch_6/gui/wxpython/nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 15 14:29:02 PDT 2013


Author: annakrat
Date: 2013-09-15 14:29:02 -0700 (Sun, 15 Sep 2013)
New Revision: 57697

Modified:
   grass/branches/develbranch_6/gui/wxpython/nviz/tools.py
   grass/branches/develbranch_6/gui/wxpython/nviz/workspace.py
Log:
wxNviz: fix error when switching to 3D second time for 3d rasters (merge from trunk, r57695)

Modified: grass/branches/develbranch_6/gui/wxpython/nviz/tools.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/nviz/tools.py	2013-09-15 21:26:53 UTC (rev 57696)
+++ grass/branches/develbranch_6/gui/wxpython/nviz/tools.py	2013-09-15 21:29:02 UTC (rev 57697)
@@ -3611,7 +3611,7 @@
         
         ret = self._display.SetIsosurfaceInOut(id, isosurfId, event.GetInt())
         if ret == 1:
-            data['isosurface'][isosurfId]['inout'] = event.GetInt()
+            data['isosurface'][isosurfId]['inout']['value'] = event.GetInt()
             
         if self.mapDisplay.IsAutoRendered():
             self.mapWindow.Refresh(False)
@@ -4711,7 +4711,7 @@
                                  attrb = attrb, map = data[attrb]['map'])
         # set inout
         if 'inout' in data:
-            self.FindWindowById(self.win['volume']['inout']).SetValue(data['inout'])
+            self.FindWindowById(self.win['volume']['inout']).SetValue(data['inout']['value'])
             
     def UpdateVolumeSlicePage(self, data):
         """!Update dialog -- slice attributes"""

Modified: grass/branches/develbranch_6/gui/wxpython/nviz/workspace.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/nviz/workspace.py	2013-09-15 21:26:53 UTC (rev 57696)
+++ grass/branches/develbranch_6/gui/wxpython/nviz/workspace.py	2013-09-15 21:29:02 UTC (rev 57697)
@@ -142,12 +142,15 @@
     def SetIsosurfaceDefaultProp(self):
         """!Set default isosurface properties"""
         data = dict()
-        for attr in ('shine', 'topo', 'transp', 'color'):
+        for attr in ('shine', 'topo', 'transp', 'color', 'inout'):
             data[attr] = {}
+            data[attr]['update'] = None
+            if attr == 'inout':
+                data[attr]['value'] = 0
+                continue                
             for key, value in UserSettings.Get(group = 'nviz', key = 'volume',
                                                subkey = attr).iteritems():
                 data[attr][key] = value
-            data[attr]['update'] = None
         return data
     
     def SetSliceDefaultProp(self):



More information about the grass-commit mailing list