[GRASS-SVN] r68380 - grass/trunk/gui/wxpython/nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 5 06:21:36 PDT 2016


Author: annakrat
Date: 2016-05-05 06:21:36 -0700 (Thu, 05 May 2016)
New Revision: 68380

Modified:
   grass/trunk/gui/wxpython/nviz/tools.py
Log:
wxGUI: fix switching to 3D view after pep8 changes

Modified: grass/trunk/gui/wxpython/nviz/tools.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/tools.py	2016-05-05 04:10:33 UTC (rev 68379)
+++ grass/trunk/gui/wxpython/nviz/tools.py	2016-05-05 13:21:36 UTC (rev 68380)
@@ -3505,13 +3505,18 @@
                 for skey, sitem in self.win[name][key].iteritems():
                     if isinstance(sitem, types.DictType):
                         for ssitem in self.win[name][key][skey].itervalues():
-                            if isinstance(ssitem, types.IntType):
+                            if not isinstance(ssitem, types.BooleanType) and \
+                               isinstance(ssitem, types.IntType):
                                 self.FindWindowById(ssitem).Enable(enabled)
                     else:
-                        if isinstance(sitem, types.IntType):
+                        # type(bool) != types.IntType but
+                        # isinstance(bool) == types.IntType
+                        if not isinstance(sitem, types.BooleanType) and \
+                           isinstance(sitem, types.IntType):
                             self.FindWindowById(sitem).Enable(enabled)
             else:
-                if isinstance(item, types.IntType):
+                if not isinstance(item, types.BooleanType) and \
+                   isinstance(item, types.IntType):
                     self.FindWindowById(item).Enable(enabled)
 
     def SetMapObjUseMap(self, nvizType, attrb, map=None):



More information about the grass-commit mailing list