aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-11-18 01:27:42 +0000
committerstuconnolly <stuart02@gmail.com>2009-11-18 01:27:42 +0000
commit71553a4723d452272210ac189e07cd017a5cf278 (patch)
treeaedba438d7574ec8969b2c9a5607fd29e4eac8bb
parent51d62d23b300a4400e08eda92805a0b08a521cd9 (diff)
downloadsequelpro-71553a4723d452272210ac189e07cd017a5cf278.tar.gz
sequelpro-71553a4723d452272210ac189e07cd017a5cf278.tar.bz2
sequelpro-71553a4723d452272210ac189e07cd017a5cf278.zip
Query history drop down index should start at 3, not 2 to avoid adding items before the separator.
-rw-r--r--Source/CustomQuery.m4
1 files changed, 2 insertions, 2 deletions
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];
}