diff --git a/wx/lib/intctrl.py b/wx/lib/intctrl.py index 7f79a844..21bdd805 100644 --- a/wx/lib/intctrl.py +++ b/wx/lib/intctrl.py @@ -859,7 +859,7 @@ class IntCtrl(wx.TextCtrl): try: return int( value ) except ValueError: - if self.IsLongAllowed(): + if self.IsLongAllowed() and (LONGTYPE is not int): return LONGTYPE( value ) else: raise