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

svn: r11043
This commit is contained in:
Brian Matherly 2008-09-09 04:00:15 +00:00
parent 66b4542bb6
commit 8fc1b24125

View File

@ -356,17 +356,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() )
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #