aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-01-05 11:54:39 +0000
committerBibiko <bibiko@eva.mpg.de>2010-01-05 11:54:39 +0000
commit642f8dfd413d4e6bf68a4c11931d745f7f46655d (patch)
treec17f6c9a7d697f4bce9ffa946460d8c9908e02ef /Source/CustomQuery.m
parentde9bca67824b192ede852ae74eab175dacb2f686 (diff)
downloadsequelpro-642f8dfd413d4e6bf68a4c11931d745f7f46655d.tar.gz
sequelpro-642f8dfd413d4e6bf68a4c11931d745f7f46655d.tar.bz2
sequelpro-642f8dfd413d4e6bf68a4c11931d745f7f46655d.zip
• fixed maximal number of history items setting
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m4
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];
}