diff options
author | rowanbeentje <rowan@beent.je> | 2010-06-09 22:32:35 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-06-09 22:32:35 +0000 |
commit | b0d60faa09d16490dffe9c0b2a948d5d1890858a (patch) | |
tree | f2c317b6005967f9302a61034968c100d53edb46 /Source/SPTableStructure.m | |
parent | ab1ffda1abe92cc4aa1d9a8428b6644a87c5489c (diff) | |
download | sequelpro-b0d60faa09d16490dffe9c0b2a948d5d1890858a.tar.gz sequelpro-b0d60faa09d16490dffe9c0b2a948d5d1890858a.tar.bz2 sequelpro-b0d60faa09d16490dffe9c0b2a948d5d1890858a.zip |
- Fix incorrect non-reset after structure editing which results in an unchanged row, resulting in subsequent editing errors and exceptions in addRowToDb
Diffstat (limited to 'Source/SPTableStructure.m')
-rw-r--r-- | Source/SPTableStructure.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 74cae1c3..bbab0785 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -818,7 +818,11 @@ closes the keySheet ([[theRow objectForKey:@"Type"] isEqualToString:@"datetime"])) { // If the old row and new row dictionaries are equal then the user didn't actually change anything so don't continue - if ([oldRow isEqualToDictionary:theRow]) return YES; + if ([oldRow isEqualToDictionary:theRow]) { + isEditingRow = NO; + currentlyEditingRow = -1; + return YES; + } queryString = [NSMutableString stringWithFormat:@"ALTER TABLE %@ CHANGE %@ %@ %@", [selectedTable backtickQuotedString], @@ -828,7 +832,11 @@ closes the keySheet } else { // If the old row and new row dictionaries are equal then the user didn't actually change anything so don't continue - if ([oldRow isEqualToDictionary:theRow]) return YES; + if ([oldRow isEqualToDictionary:theRow]) { + isEditingRow = NO; + currentlyEditingRow = -1; + return YES; + } queryString = [NSMutableString stringWithFormat:@"ALTER TABLE %@ CHANGE %@ %@ %@(%@)", [selectedTable backtickQuotedString], |