Skip to content

Commit

Permalink
Fixes a minor bug in the Filters window in which, when the "Clear all…
Browse files Browse the repository at this point in the history
…" 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.
  • Loading branch information
mjdescy committed Jan 20, 2015
1 parent 5dd6ba4 commit e68d191
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions TodoTxtMac/TTMFiltersController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}];
}
Expand Down

0 comments on commit e68d191

Please sign in to comment.