From 6b62af2bf9c02d2f57c93653e562deb20d9298fa Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 4 Mar 2009 11:28:27 +0000 Subject: Fix a bug related to not saving unchanged-but-edited rows, introduced in r370. --- Source/TableContent.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/TableContent.m b/Source/TableContent.m index 1e40e99d..9a85b84a 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1132,8 +1132,12 @@ } - // If editing, compare the new row to the old row and if they're the same do nothing. - if ( !isEditingNewRow && [oldRow isEqualToDictionary:[filteredResult objectAtIndex:currentlyEditingRow]] ) return YES; + // If editing, compare the new row to the old row and if they are identical finish editing without saving. + if (!isEditingNewRow && [oldRow isEqualToDictionary:[filteredResult objectAtIndex:currentlyEditingRow]]) { + isEditingRow = NO; + currentlyEditingRow = -1; + return YES; + } // Retrieve the field names and types for this table from the data cache. This is used when requesting all data as part // of the fieldListForQuery method, and also to decide whether or not to preserve the current filter/sort settings. -- cgit v1.2.3