From fab9fe2a7da3192c6329b83c01dd2aee3b234973 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 23 Oct 2014 00:36:04 -0400 Subject: [PATCH] Filter - Modified algorithm for ::pendingOnly. --- src/Filter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Filter.cpp b/src/Filter.cpp index 046cada37..1f2d03fb3 100644 --- a/src/Filter.cpp +++ b/src/Filter.cpp @@ -214,9 +214,11 @@ bool Filter::pendingOnly () Tree* tree = context.parser.tree (); // To skip loading completed.data, there should be: - // - 'status:pending' - // - no 'or' operators - // - no 'xor' operators + // - 'status' in filter + // - no 'completed' + // - no 'deleted' + // - no 'xor' + // - no 'or' int countStatus = 0; int countPending = 0; int countId = 0; @@ -244,7 +246,7 @@ bool Filter::pendingOnly () return false; // Only one 'status == pending' is allowed. - if (countStatus == 1 && countPending != 1) + if (countStatus != 1 || countPending != 1) return false; return true;