diff options
author | stuconnolly <stuart02@gmail.com> | 2009-11-18 01:27:42 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-11-18 01:27:42 +0000 |
commit | 71553a4723d452272210ac189e07cd017a5cf278 (patch) | |
tree | aedba438d7574ec8969b2c9a5607fd29e4eac8bb /Source/CustomQuery.m | |
parent | 51d62d23b300a4400e08eda92805a0b08a521cd9 (diff) | |
download | sequelpro-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.
Diffstat (limited to 'Source/CustomQuery.m')
-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 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]; } |