From e68d1911e3786bdfdecf52588636c683fd25caa3 Mon Sep 17 00:00:00 2001 From: mjdescy Date: Mon, 19 Jan 2015 22:03:35 -0500 Subject: [PATCH] Fixes a minor bug in the Filters window in which, when the "Clear all" filters button is clicked, the predicate editor that currently has focus (i.e., has a predicate editor row in edit more) is not cleared. Related to Issue #50. --- TodoTxtMac/TTMFiltersController.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/TodoTxtMac/TTMFiltersController.m b/TodoTxtMac/TTMFiltersController.m index a5cf258..f06fb84 100644 --- a/TodoTxtMac/TTMFiltersController.m +++ b/TodoTxtMac/TTMFiltersController.m @@ -70,6 +70,19 @@ - (IBAction)resetAllFilters:(id)sender { completionHandler:^(NSModalResponse returnCode) { if (returnCode == NSAlertDefaultReturn) { [TTMFilterPredicates resetAllFilterPredicates]; + // Reload all the filter predicate editors because + // the one with focus at the time this method is executed + // will not be cleared. This is only really necessary to + // call on the predicate editor with focus. + [self.filter1PredicateEditor reloadCriteria]; + [self.filter2PredicateEditor reloadCriteria]; + [self.filter3PredicateEditor reloadCriteria]; + [self.filter4PredicateEditor reloadCriteria]; + [self.filter5PredicateEditor reloadCriteria]; + [self.filter6PredicateEditor reloadCriteria]; + [self.filter7PredicateEditor reloadCriteria]; + [self.filter8PredicateEditor reloadCriteria]; + [self.filter9PredicateEditor reloadCriteria]; } }]; }