Fix missing checks before .set_active()

Some validity tests were still missing. Also, typofix:
self.cbFl -> self.cbFL
This commit is contained in:
Mika Bostrom 2009-11-26 23:07:58 +02:00
parent ac96d88a8c
commit df6d9a0a56

View File

@ -312,8 +312,8 @@ class Filters(threading.Thread):
self.cbAllLimits.set_active(False) self.cbAllLimits.set_active(False)
if not self.limits[limit]: if not self.limits[limit]:
if limit.isdigit(): if limit.isdigit():
if self.cbFl is not None: if self.cbFL is not None:
self.cbFl.set_active(False) self.cbFL.set_active(False)
else: else:
if self.cbNL is not None: if self.cbNL is not None:
self.cbNL.set_active(False) self.cbNL.set_active(False)
@ -329,8 +329,10 @@ class Filters(threading.Thread):
if self.limits[limit]: if self.limits[limit]:
for cb in self.cbLimits.values(): for cb in self.cbLimits.values():
cb.set_active(False) cb.set_active(False)
self.cbNL.set_active(False) if self.cbNL is not None:
self.cbFL.set_active(False) self.cbNL.set_active(False)
if self.cbFL is not None:
self.cbFL.set_active(False)
elif limit == "fl": elif limit == "fl":
if not self.limits[limit]: if not self.limits[limit]:
# only toggle all fl limits off if they are all currently on # only toggle all fl limits off if they are all currently on