Author: bugman Date: Wed Jun 6 19:20:09 2012 New Revision: 16713 URL: http://svn.gna.org/viewcvs/relax?rev=16713&view=rev Log: Improvements for the Force_true object for the 'force flag' user function argument types. This invisible GUI element can now have its value set. The SetValue() method will internally store the value, and GetValue() will then return this value. The initial value is True. This allows the BMRB GUI tests to pass again. Modified: branches/uf_redesign/gui/uf_objects.py Modified: branches/uf_redesign/gui/uf_objects.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/uf_objects.py?rev=16713&r1=16712&r2=16713&view=diff ============================================================================== --- branches/uf_redesign/gui/uf_objects.py (original) +++ branches/uf_redesign/gui/uf_objects.py Wed Jun 6 19:20:09 2012 @@ -154,14 +154,25 @@ class Force_true(object): """A special user function arg element which always returns True.""" + def __init__(self): + """Initialise the object.""" + + # Default to always being True. + self._value = True + + def GetValue(self): - """Simple method for returning True.""" - - return True + """Simple method for returning the internal value.""" + + # Return the stored value. + return self._value def SetValue(self, value): - """Dummy method.""" + """Internally store the value being set.""" + + # Store the value. + self._value = value