Forráskód Böngészése

wxGUI: fix switching to 3D view after pep8 changes

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68380 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 éve
szülő
commit
16b2a722d0
1 módosított fájl, 8 hozzáadás és 3 törlés
  1. 8 3
      gui/wxpython/nviz/tools.py

+ 8 - 3
gui/wxpython/nviz/tools.py

@@ -3505,13 +3505,18 @@ class NvizToolWindow(FN.FlatNotebook):
                 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):