Author: bugman Date: Thu May 10 10:56:43 2012 New Revision: 16173 URL: http://svn.gna.org/viewcvs/relax?rev=16173&view=rev Log: The wx.SpinCtrl used in the Value wizard page element is now fail-safe. The code now catches min and max values of None, and does not set the initial value so that a default value of None does not break the wx element! Modified: branches/uf_redesign/gui/wizard_elements.py Modified: branches/uf_redesign/gui/wizard_elements.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/wizard_elements.py?rev=16173&r1=16172&r2=16173&view=diff ============================================================================== --- branches/uf_redesign/gui/wizard_elements.py (original) +++ branches/uf_redesign/gui/wizard_elements.py Thu May 10 10:56:43 2012 @@ -1251,8 +1251,14 @@ # Initialise the spinner input field. elif self.element_type == 'spin': + # Catch limits of None, and set to the wxSpinCtrl defaults. + if min == None: + min = 0 + if max == None: + max = 100 + # Set up the text control. - self._field = wx.SpinCtrl(parent, -1, initial=default, min=min, max=max) + self._field = wx.SpinCtrl(parent, -1, min=min, max=max) # Read only field (really no such thing for a spin control). if read_only: