From 8b2503aaed2a149c932697eb58d993aff25f3fdd Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 1 Dec 2009 22:41:05 +0000 Subject: - Ensure the table length is updated before the end of the load to fix crashes in the old non-threaded code when the row count is reduced (performSelectorOnMainThread:waitUntilDone:NO was deferring updates until past table reload). This addresses Issue #487. --- Source/TableContent.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/TableContent.m b/Source/TableContent.m index 06fc9dce..868b0ad1 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -702,6 +702,8 @@ pthread_mutex_unlock(&tableValuesLock); } + // Ensure the table is aware of changes, especially for non-threaded loads + [tableContentView performSelectorOnMainThread:@selector(noteNumberOfRowsChanged) withObject:nil waitUntilDone:YES]; [tableContentView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO]; // Clean up the autorelease pool and reset the progress indicator -- cgit v1.2.3