From 71553a4723d452272210ac189e07cd017a5cf278 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Wed, 18 Nov 2009 01:27:42 +0000 Subject: Query history drop down index should start at 3, not 2 to avoid adding items before the separator. --- Source/CustomQuery.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index 5886471f..90bf011a 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -617,11 +617,11 @@ [[SPQueryController sharedQueryController] addHistory:usedQuery forFileURL:[tableDocumentInstance fileURL]]; // Add it to the document's current popup list - [queryHistoryButton insertItemWithTitle:usedQuery atIndex:2]; + [queryHistoryButton insertItemWithTitle:usedQuery atIndex:3]; // Check for max history NSUInteger maxHistoryItems = [[prefs objectForKey:SPCustomQueryMaxHistoryItems] intValue]; - while ( [queryHistoryButton numberOfItems] > maxHistoryItems + 2 ) + while ( [queryHistoryButton numberOfItems] > maxHistoryItems + 3 ) [queryHistoryButton removeItemAtIndex:[queryHistoryButton numberOfItems]-1]; } -- cgit v1.2.3