Skip to content

Commit

Permalink
FEM: py3 fix in selection widget
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Dec 16, 2019
1 parent f1a3a62 commit 1f53e8b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Mod/Fem/femguiobjects/FemSelectionWidgets.py
Expand Up @@ -29,6 +29,8 @@
# \ingroup FEM
# \brief FreeCAD FEM FemSelectWidget

import sys

import FreeCAD
import FreeCADGui
import femmesh.meshtools as FemMeshTools
Expand Down Expand Up @@ -206,7 +208,11 @@ def _getSolidOfSub(self, obj, sub):
if self._findSub(sub, solid.Vertexes):
foundSolids.add("Solid" + str(solidId + 1))
if len(foundSolids) == 1:
return iter(foundSolids).next()
it = iter(foundSolids)
if sys.version_info.major >= 3:
return next(it)
else:
return it.next()
return None

def _findSub(self, sub, subList):
Expand Down

0 comments on commit 1f53e8b

Please sign in to comment.