Bladeren bron

wxNviz: fix error when switching to 3D second time for 3d rasters

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57695 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 jaren geleden
bovenliggende
commit
741ad4fa8a
2 gewijzigde bestanden met toevoegingen van 7 en 4 verwijderingen
  1. 2 2
      gui/wxpython/nviz/tools.py
  2. 5 2
      gui/wxpython/nviz/workspace.py

+ 2 - 2
gui/wxpython/nviz/tools.py

@@ -3834,7 +3834,7 @@ class NvizToolWindow(FN.FlatNotebook):
         
         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)
@@ -4973,7 +4973,7 @@ class NvizToolWindow(FN.FlatNotebook):
                                  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"""

+ 5 - 2
gui/wxpython/nviz/workspace.py

@@ -147,12 +147,15 @@ class NvizSettings(object):
     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):