diff options
author | rowanbeentje <rowan@beent.je> | 2010-02-23 01:26:33 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-02-23 01:26:33 +0000 |
commit | a24e9c697049bacb587835153e2ebb4764fff008 (patch) | |
tree | bab464b0eb1c44bb35ed745d41ba2e46beb9350d /Source/SPHistoryController.m | |
parent | c11169058366ca679789bc82cf1b3ca8ed496967 (diff) | |
download | sequelpro-a24e9c697049bacb587835153e2ebb4764fff008.tar.gz sequelpro-a24e9c697049bacb587835153e2ebb4764fff008.tar.bz2 sequelpro-a24e9c697049bacb587835153e2ebb4764fff008.zip |
Fix Issue #574 (foreign key links not working after first use):
- Move foreign key reference loading into it's own task and set state modification markers to allow it to override the table state history
- Rename modifyingHistoryState to modifyingState now the usge has broadened slightly
Diffstat (limited to 'Source/SPHistoryController.m')
-rw-r--r-- | Source/SPHistoryController.m | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/SPHistoryController.m b/Source/SPHistoryController.m index 2c1a657f..04d8a765 100644 --- a/Source/SPHistoryController.m +++ b/Source/SPHistoryController.m @@ -32,7 +32,7 @@ @synthesize history; @synthesize historyPosition; -@synthesize modifyingHistoryState; +@synthesize modifyingState; #pragma mark Setup and teardown @@ -45,7 +45,7 @@ history = [[NSMutableArray alloc] init]; tableContentStates = [[NSMutableDictionary alloc] init]; historyPosition = NSNotFound; - modifyingHistoryState = NO; + modifyingState = NO; } return self; } @@ -183,7 +183,7 @@ { // Don't modify anything if we're in the process of restoring an old history state - if (modifyingHistoryState) return; + if (modifyingState) return; // Work out the current document details NSString *theDatabase = [theDocument database]; @@ -298,7 +298,7 @@ NSAutoreleasePool *loadPool = [[NSAutoreleasePool alloc] init]; NSUInteger position = [positionNumber unsignedIntegerValue]; - modifyingHistoryState = YES; + modifyingState = YES; // Update the position and extract the history entry historyPosition = position; @@ -317,7 +317,7 @@ && [[historyEntry objectForKey:@"view"] integerValue] == [self currentlySelectedView] == SP_VIEW_CONTENT) { [tableContentInstance loadTable:[historyEntry objectForKey:@"table"]]; - modifyingHistoryState = NO; + modifyingState = NO; [self updateToolbarItem]; [theDocument endTask]; [loadPool drain]; @@ -379,7 +379,7 @@ } } - modifyingHistoryState = NO; + modifyingState = NO; [self updateToolbarItem]; // End the task @@ -394,7 +394,7 @@ - (void) abortEntryLoadWithPool:(NSAutoreleasePool *)pool { NSBeep(); - modifyingHistoryState = NO; + modifyingState = NO; [theDocument endTask]; if (pool) [pool drain]; } @@ -421,7 +421,7 @@ NSDictionary *contentState; // Return if the history state is currently being modified - if (modifyingHistoryState) return; + if (modifyingState) return; // Return if no database or table are selected if (!theDatabase || !theTable) return; |