diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-01-05 11:54:39 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-01-05 11:54:39 +0000 |
commit | 642f8dfd413d4e6bf68a4c11931d745f7f46655d (patch) | |
tree | c17f6c9a7d697f4bce9ffa946460d8c9908e02ef | |
parent | de9bca67824b192ede852ae74eab175dacb2f686 (diff) | |
download | sequelpro-642f8dfd413d4e6bf68a4c11931d745f7f46655d.tar.gz sequelpro-642f8dfd413d4e6bf68a4c11931d745f7f46655d.tar.bz2 sequelpro-642f8dfd413d4e6bf68a4c11931d745f7f46655d.zip |
• fixed maximal number of history items setting
-rw-r--r-- | Source/CustomQuery.m | 4 |
1 files 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]; } |