0002309: Crash rerunning report after deleting used filter. (Improved fix - the last fix caused errors)

svn: r11044
This commit is contained in:
Brian Matherly 2008-09-09 04:03:17 +00:00
parent da031847a4
commit 686a77a212

View File

@ -355,17 +355,25 @@ class EnumeratedListOption(Option):
self.__items = [] self.__items = []
self.emit('options-changed') self.emit('options-changed')
def get_value(self): def set_value(self, value):
""" """
Get the value of this option. Set the value of this option.
@return: The option value. @param value: A value for this option.
Example: True
@type value: The type will depend on the type of option.
@return: nothing
""" """
value = Option.get_value(self) found = False
if value >= len(self.__items): for (opt_value, opt_description) in self.__items:
# Range check the value if value == opt_value:
value = 0 found = True
return value
if found:
Option.set_value(self, value)
else:
print "Value %s not found for option %s" % ( str(value),
self.get_label() )
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #