From b0d60faa09d16490dffe9c0b2a948d5d1890858a Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 9 Jun 2010 22:32:35 +0000 Subject: - Fix incorrect non-reset after structure editing which results in an unchanged row, resulting in subsequent editing errors and exceptions in addRowToDb --- Source/SPTableStructure.m | 12 ++++++++++-- 1 file 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], -- cgit v1.2.3