diff options
author | stuconnolly <stuart02@gmail.com> | 2011-05-10 18:38:20 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-05-10 18:38:20 +0000 |
commit | 34080e5dc8394b070986800eb748c1d6ac12b8ba (patch) | |
tree | 46b480da36040a4ab63381357dd88c159e44dab4 | |
parent | d3943164cdba8b528413942e3b01ffc67e64436f (diff) | |
download | sequelpro-34080e5dc8394b070986800eb748c1d6ac12b8ba.tar.gz sequelpro-34080e5dc8394b070986800eb748c1d6ac12b8ba.tar.bz2 sequelpro-34080e5dc8394b070986800eb748c1d6ac12b8ba.zip |
During a table data refresh within SPTableContent's loadTable: remember to ensure that endTask is called before bailing in the event of error occurring (e.g. corrupt table) in order to re-enable various interface controls. Fixes issue #1046.
-rw-r--r-- | Source/SPTableContent.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 6422ff7e..82bdbfcc 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -223,7 +223,6 @@ */ - (void)loadTable:(NSString *)aTable { - // Abort the reload if the user is still editing a row if ( isEditingRow ) return; @@ -231,6 +230,8 @@ // If no table has been supplied, clear the table interface and return if (!aTable || [aTable isEqualToString:@""]) { [self performSelectorOnMainThread:@selector(setTableDetails:) withObject:nil waitUntilDone:YES]; + [tableDocumentInstance performSelectorOnMainThread:@selector(endTask) withObject:nil waitUntilDone:YES]; + return; } @@ -238,6 +239,8 @@ // while retrieving table data), or if the Rows variable is null, clear and return if (![tableDataInstance tableEncoding] || [[[tableDataInstance statusValues] objectForKey:@"Rows"] isNSNull]) { [self performSelectorOnMainThread:@selector(setTableDetails:) withObject:nil waitUntilDone:YES]; + [tableDocumentInstance performSelectorOnMainThread:@selector(endTask) withObject:nil waitUntilDone:YES]; + return; } @@ -1335,7 +1338,6 @@ */ - (IBAction)filterTable:(id)sender { - if(sender == filterTableFilterButton) activeFilter = 1; else if([sender isKindOfClass:[NSString class]] && [(NSString *)sender length]) { |