diff options
author | rowanbeentje <rowan@beent.je> | 2010-09-14 23:41:22 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-09-14 23:41:22 +0000 |
commit | ab62501d38b50c04d9cd2e4bb00782254e675aa8 (patch) | |
tree | 148842441b463f2047da53060a511186df550f9a /Source | |
parent | ddeed0fc32f92b86f18c31d2a1efb152cf81609f (diff) | |
download | sequelpro-ab62501d38b50c04d9cd2e4bb00782254e675aa8.tar.gz sequelpro-ab62501d38b50c04d9cd2e4bb00782254e675aa8.tar.bz2 sequelpro-ab62501d38b50c04d9cd2e4bb00782254e675aa8.zip |
- Fix row count tracking when deleting table rows; this fixes Issue #819
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTableContent.m | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 92b9ad15..90e7262a 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -1708,7 +1708,7 @@ // If no PRIMARY KEY is found and numberOfSelectedRows > 3 then // check for uniqueness of rows via combining all column values; // if unique then use the all columns as 'primary keys' - if([selectedRows count] >3 && primaryKeyFieldNames == nil) { + if([selectedRows count] > 3 && primaryKeyFieldNames == nil) { primaryKeyFieldNames = [tableDataInstance columnNames]; NSInteger numberOfRows = 0; @@ -1843,10 +1843,6 @@ // Restore Console Log window's updating bahaviour [[SPQueryController sharedQueryController] setAllowConsoleUpdate:consoleUpdateStatus]; - maxNumRows -= affectedRows; - tableRowsCount -= affectedRows; - [self updateCountText]; - if (errors) { NSArray *message; //TODO: The following three messages are NOT localisable! @@ -1881,6 +1877,10 @@ } tableRowsCount = [tableValues count]; [tableContentView reloadData]; + + // Update the maximum number of rows and the count text + maxNumRows -= affectedRows; + [self updateCountText]; } [tableContentView deselectAll:self]; } else { |