From df6d9a0a56b575cc375173571aaa6351e531953c Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Thu, 26 Nov 2009 23:07:58 +0200 Subject: [PATCH] Fix missing checks before .set_active() Some validity tests were still missing. Also, typofix: self.cbFl -> self.cbFL --- pyfpdb/Filters.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pyfpdb/Filters.py b/pyfpdb/Filters.py index 5beef90f..c74d5579 100644 --- a/pyfpdb/Filters.py +++ b/pyfpdb/Filters.py @@ -312,8 +312,8 @@ class Filters(threading.Thread): self.cbAllLimits.set_active(False) if not self.limits[limit]: if limit.isdigit(): - if self.cbFl is not None: - self.cbFl.set_active(False) + if self.cbFL is not None: + self.cbFL.set_active(False) else: if self.cbNL is not None: self.cbNL.set_active(False) @@ -329,8 +329,10 @@ class Filters(threading.Thread): if self.limits[limit]: for cb in self.cbLimits.values(): cb.set_active(False) - self.cbNL.set_active(False) - self.cbFL.set_active(False) + if self.cbNL is not None: + self.cbNL.set_active(False) + if self.cbFL is not None: + self.cbFL.set_active(False) elif limit == "fl": if not self.limits[limit]: # only toggle all fl limits off if they are all currently on