From f8378c683a8b73c80f33ae637bd8392526b3adcc Mon Sep 17 00:00:00 2001 From: wernerfb Date: Wed, 16 Sep 2015 10:29:48 +0200 Subject: [PATCH] - next is a built-in function in Py3 --- wx/lib/floatcanvas/FCObjects.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/wx/lib/floatcanvas/FCObjects.py b/wx/lib/floatcanvas/FCObjects.py index e6be08e2..906fa0ab 100644 --- a/wx/lib/floatcanvas/FCObjects.py +++ b/wx/lib/floatcanvas/FCObjects.py @@ -2869,9 +2869,16 @@ class Group(DrawObject): if not self.HitColor: if not self._Canvas.HitColorGenerator: self._Canvas.HitColorGenerator = _colorGenerator() - self._Canvas.HitColorGenerator.next() # first call to prevent the background color from being used. + # first call to prevent the background color from being used. + if six.PY2: + self._Canvas.HitColorGenerator.next() + else: + next(self._Canvas.HitColorGenerator) # Set all contained objects to the same Hit color: - self.HitColor = self._Canvas.HitColorGenerator.next() + if six.PY2: + self.HitColor = self._Canvas.HitColorGenerator.next() + else: + self.HitColor = next(self._Canvas.HitColorGenerator) self._ChangeChildrenHitColor(self.ObjectList) # put the object in the hit dict, indexed by it's color if not self._Canvas.HitDict: