diff options
author | rowanbeentje <rowan@beent.je> | 2009-10-23 23:35:58 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-10-23 23:35:58 +0000 |
commit | a5177fe6ec1107f97c326982a77100324532ccc0 (patch) | |
tree | 930daac908e5da39e8527f568d64fc6ee31b304c /Source/TableContent.m | |
parent | 7ae72b27901fab32419ef5e4321d03ba647a118c (diff) | |
download | sequelpro-a5177fe6ec1107f97c326982a77100324532ccc0.tar.gz sequelpro-a5177fe6ec1107f97c326982a77100324532ccc0.tar.bz2 sequelpro-a5177fe6ec1107f97c326982a77100324532ccc0.zip |
- Apply new document task support to the Custom Query tab, and run all custom queries in a background thread with the task interface active.
- Rework custom query result processing to allow display of results as they come in
- Fix a memory leak
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r-- | Source/TableContent.m | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m index d038dfef..4286723a 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1418,15 +1418,16 @@ } else if (rowsProcessed == targetRowCount) { [tableDocumentInstance performSelectorOnMainThread:@selector(setTaskProgressToIndeterminate) withObject:nil waitUntilDone:NO]; } - - if (rowsProcessed > nextTableDisplayBoundary) { - [tableContentView performSelectorOnMainThread:@selector(noteNumberOfRowsChanged) withObject:nil waitUntilDone:NO]; - if (!tableViewRedrawn) { - [tableContentView performSelectorOnMainThread:@selector(displayIfNeeded) withObject:nil waitUntilDone:NO]; - tableViewRedrawn = YES; - } - nextTableDisplayBoundary *= 2; + } + + // Update the table view with new results every now and then + if (rowsProcessed > nextTableDisplayBoundary) { + [tableContentView performSelectorOnMainThread:@selector(noteNumberOfRowsChanged) withObject:nil waitUntilDone:NO]; + if (!tableViewRedrawn) { + [tableContentView performSelectorOnMainThread:@selector(displayIfNeeded) withObject:nil waitUntilDone:NO]; + tableViewRedrawn = YES; } + nextTableDisplayBoundary *= 2; } // Drain and reset the autorelease pool every ~1024 rows |