aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryController.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-10-15 13:45:35 +0000
committerBibiko <bibiko@eva.mpg.de>2009-10-15 13:45:35 +0000
commit7e023c253e72c9a27bba0728160fbb8aaf19ffd1 (patch)
tree1e706e19da51c15ee51ee71de4dc69766f45ad6c /Source/SPQueryController.m
parent778c3556b551077d488af6378108db0630775953 (diff)
downloadsequelpro-7e023c253e72c9a27bba0728160fbb8aaf19ffd1.tar.gz
sequelpro-7e023c253e72c9a27bba0728160fbb8aaf19ffd1.tar.bz2
sequelpro-7e023c253e72c9a27bba0728160fbb8aaf19ffd1.zip
• added the chance to set "allowConsoleUpdate"
- if set to YES the Console Log won't be updated after adding a new message even if the window is visible; this is useful if SP has to execute a large number of queries • first steps to increase the deletion of a large number of rows in the Content pane - removed deprecated 'selectedRowEnumerator' - set Console Log's 'allowConsoleUpdate' to NO if more than 10 rows should be deleted - instead of adding the successful deleted row indexes into a new array delete these indexes from the selectedRows NSIndexSet
Diffstat (limited to 'Source/SPQueryController.m')
-rw-r--r--Source/SPQueryController.m36
1 files changed, 19 insertions, 17 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m
index 86fa9908..3a3a2982 100644
--- a/Source/SPQueryController.m
+++ b/Source/SPQueryController.m
@@ -54,32 +54,33 @@ static SPQueryController *sharedQueryController = nil;
@implementation SPQueryController
@synthesize consoleFont;
+@synthesize allowConsoleUpdate;
/*
* Returns the shared query console.
*/
+ (SPQueryController *)sharedQueryController
{
- @synchronized(self) {
- if (sharedQueryController == nil) {
- [[self alloc] init];
- }
- }
-
- return sharedQueryController;
+ @synchronized(self) {
+ if (sharedQueryController == nil) {
+ [[self alloc] init];
+ }
+ }
+
+ return sharedQueryController;
}
+ (id)allocWithZone:(NSZone *)zone
{
- @synchronized(self) {
- if (sharedQueryController == nil) {
- sharedQueryController = [super allocWithZone:zone];
-
- return sharedQueryController;
- }
- }
-
- return nil; // On subsequent allocation attempts return nil
+ @synchronized(self) {
+ if (sharedQueryController == nil) {
+ sharedQueryController = [super allocWithZone:zone];
+
+ return sharedQueryController;
+ }
+ }
+
+ return nil; // On subsequent allocation attempts return nil
}
- (id)init
@@ -98,6 +99,7 @@ static SPQueryController *sharedQueryController = nil;
untitledDocumentCounter = 1;
numberOfMaxAllowedHistory = 100;
+ allowConsoleUpdate = YES;
favoritesContainer = [[NSMutableDictionary alloc] init];
historyContainer = [[NSMutableDictionary alloc] init];
@@ -757,7 +759,7 @@ static SPQueryController *sharedQueryController = nil;
}
// Reload the table and scroll to the new message if it's visible (for speed)
- if ( [[self window] isVisible] ) {
+ if ( allowConsoleUpdate && [[self window] isVisible] ) {
[consoleTableView reloadData];
[consoleTableView scrollRowToVisible:([messagesVisibleSet count] - 1)];
}