aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CustomQuery.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 9dbd5a20..3d8b5383 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -421,7 +421,7 @@ sets the tableView columns corresponding to the mysql-result
//add query to history
[queryHistoryButton insertItemWithTitle:[queries componentsJoinedByString:@"; "] atIndex:1];
- while ( [queryHistoryButton numberOfItems] > 21 ) {
+ while ( [queryHistoryButton numberOfItems] > [[prefs objectForKey:@"CustomQueryMaxHistoryItems"] intValue] + 1 ) {
[queryHistoryButton removeItemAtIndex:[queryHistoryButton numberOfItems]-1];
}
for ( i = 1 ; i < [queryHistoryButton numberOfItems] ; i++ )