From fb9f9df80e7492035564c2927d0599fb36825695 Mon Sep 17 00:00:00 2001 From: gimick Date: Thu, 24 Feb 2011 22:10:12 +0000 Subject: [PATCH] filters: clear all individual checkboxes when limits=none selected --- pyfpdb/Filters.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pyfpdb/Filters.py b/pyfpdb/Filters.py index 2e27ae96..d707640c 100644 --- a/pyfpdb/Filters.py +++ b/pyfpdb/Filters.py @@ -469,10 +469,7 @@ class Filters(threading.Thread): self.cbCN.set_active(True) elif limit == "none": if self.limits[limit]: - if self.num_limit_types == 1: - for cb in self.cbLimits.values(): - cb.set_active(False) - else: + if self.num_limit_types > 1: if self.cbNL is not None: self.cbNL.set_active(False) if self.cbFL is not None: @@ -481,6 +478,13 @@ class Filters(threading.Thread): self.cbPL.set_active(False) if self.cbCN is not None: self.cbCN.set_active(False) + # + # Finally, clean-up all individual limit checkboxes + # needed because the overall limit checkbox may + # not be set, or num_limit_types == 1 + # + for cb in self.cbLimits.values(): + cb.set_active(False) elif limit == "fl": if not self.limits[limit]: # only toggle all fl limits off if they are all currently on