aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-03-04 11:28:27 +0000
committerrowanbeentje <rowan@beent.je>2009-03-04 11:28:27 +0000
commit6b62af2bf9c02d2f57c93653e562deb20d9298fa (patch)
treecf458284ccde9057750e797d08d3afe752d7d3a2 /Source/TableContent.m
parentc4e668aa544b62c4720bbd8af95884501958f754 (diff)
downloadsequelpro-6b62af2bf9c02d2f57c93653e562deb20d9298fa.tar.gz
sequelpro-6b62af2bf9c02d2f57c93653e562deb20d9298fa.tar.bz2
sequelpro-6b62af2bf9c02d2f57c93653e562deb20d9298fa.zip
Fix a bug related to not saving unchanged-but-edited rows, introduced in r370.
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m8
1 files changed, 6 insertions, 2 deletions
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.