From 642f8dfd413d4e6bf68a4c11931d745f7f46655d Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 5 Jan 2010 11:54:39 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20maximal=20number=20of=20history=20i?= =?UTF-8?q?tems=20setting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CustomQuery.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 358361b6..48de864f 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -669,14 +669,14 @@ [[SPQueryController sharedQueryController] addHistory:usedQuery forFileURL:[tableDocumentInstance fileURL]]; // Add it to the document's current popup list - if([queryHistoryButton numberOfItems] > 8) + if([queryHistoryButton numberOfItems] > 7) [queryHistoryButton insertItemWithTitle:usedQuery atIndex:7]; else [queryHistoryButton addItemWithTitle:usedQuery]; // Check for max history NSUInteger maxHistoryItems = [[prefs objectForKey:SPCustomQueryMaxHistoryItems] intValue]; - while ( [queryHistoryButton numberOfItems] > maxHistoryItems + 6 ) + while ( [queryHistoryButton numberOfItems] > maxHistoryItems + 7 ) [queryHistoryButton removeItemAtIndex:[queryHistoryButton numberOfItems]-1]; } -- cgit v1.2.3