From db7e947f1b4379319014c08c76586d9e1c2befc6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 7 Feb 2003 17:52:36 +0000 Subject: [PATCH] workaround for an extra EVT_TEXT on wxGTK when selected text is replaced causing an exception git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxPython/lib/intctrl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxPython/wxPython/lib/intctrl.py b/wxPython/wxPython/lib/intctrl.py index 0907ae90b2..767f87cbad 100644 --- a/wxPython/wxPython/lib/intctrl.py +++ b/wxPython/wxPython/lib/intctrl.py @@ -720,7 +720,10 @@ class wxIntCtrl(wxTextCtrl): Conversion function used in getting the value of the control. """ if value == '': - return None + if not self.IsNoneAllowed(): + return 0 + else: + return None else: try: return int( value )