From f154417d5a25d4452b50337da7e3aa1f49dffd33 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 7 Sep 2011 21:38:54 +0000 Subject: - 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. --- Source/SPTableContent.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; -- cgit v1.2.3