aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPHistoryController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPHistoryController.m')
-rw-r--r--Source/SPHistoryController.m14
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/SPHistoryController.m b/Source/SPHistoryController.m
index 7644f97f..17f2d3d7 100644
--- a/Source/SPHistoryController.m
+++ b/Source/SPHistoryController.m
@@ -301,6 +301,8 @@
[tableContentInstance loadTable:[historyEntry objectForKey:@"table"]];
modifyingHistoryState = NO;
[self updateToolbarItem];
+ [theDocument endTask];
+ [loadPool drain];
return;
}
@@ -314,7 +316,7 @@
[chooseDatabaseButton selectItemWithTitle:[historyEntry objectForKey:@"database"]];
[theDocument chooseDatabase:self];
if (![[theDocument database] isEqualToString:[historyEntry objectForKey:@"database"]]) {
- return [self abortEntryLoad];
+ return [self abortEntryLoadWithPool:loadPool];
}
}
@@ -322,11 +324,11 @@
if ([historyEntry objectForKey:@"table"] && ![[theDocument table] isEqualToString:[historyEntry objectForKey:@"table"]]) {
NSArray *tables = [tablesListInstance tables];
if ([tables indexOfObject:[historyEntry objectForKey:@"table"]] == NSNotFound) {
- return [self abortEntryLoad];
+ return [self abortEntryLoadWithPool:loadPool];
}
[[tablesListInstance valueForKey:@"tablesListView"] selectRowIndexes:[NSIndexSet indexSetWithIndex:[tables indexOfObject:[historyEntry objectForKey:@"table"]]] byExtendingSelection:NO];
if (![[theDocument table] isEqualToString:[historyEntry objectForKey:@"table"]]) {
- return [self abortEntryLoad];
+ return [self abortEntryLoadWithPool:loadPool];
}
} else if (![historyEntry objectForKey:@"table"] && [theDocument table]) {
[tablesListInstance setTableListSelectability:YES];
@@ -355,7 +357,7 @@
break;
}
if ([self currentlySelectedView] != [[historyEntry objectForKey:@"view"] intValue]) {
- return [self abortEntryLoad];
+ return [self abortEntryLoadWithPool:loadPool];
}
}
@@ -371,10 +373,12 @@
* Convenience method for aborting history load - could at some point
* clean up the history list, show an alert, etc
*/
-- (void) abortEntryLoad
+- (void) abortEntryLoadWithPool:(NSAutoreleasePool *)pool
{
NSBeep();
modifyingHistoryState = NO;
+ [theDocument endTask];
+ if (pool) [pool drain];
}
/**