aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-09-07 21:38:54 +0000
committerrowanbeentje <rowan@beent.je>2011-09-07 21:38:54 +0000
commitf154417d5a25d4452b50337da7e3aa1f49dffd33 (patch)
tree47e2e803b976503a4a4ee204bc917ff64f2865cf /Source/SPTableContent.m
parent84324fa58adeecd895b4d52c98f34db5f8ddf3e3 (diff)
downloadsequelpro-f154417d5a25d4452b50337da7e3aa1f49dffd33.tar.gz
sequelpro-f154417d5a25d4452b50337da7e3aa1f49dffd33.tar.bz2
sequelpro-f154417d5a25d4452b50337da7e3aa1f49dffd33.zip
- Require there to be at least 50 rows to be in the table before using the "DELETE FROM foo" remove all rows code path. This improves the chance that the user actually intends to delete all the rows in the table, addressing Issue #1166.
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r--Source/SPTableContent.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index aef067a6..425bc6b1 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -1901,7 +1901,7 @@
NSString *contextInfo = @"removerow";
- if (([tableContentView numberOfSelectedRows] == [tableContentView numberOfRows]) && !isFiltered && !isLimited && !isInterruptedLoad && !isEditingNewRow) {
+ if (([tableContentView numberOfSelectedRows] == [tableContentView numberOfRows]) && [tableContentView numberOfSelectedRows] > 50 && !isFiltered && !isLimited && !isInterruptedLoad && !isEditingNewRow) {
contextInfo = @"removeallrows";