Don't attempt to remove rows in the edit grid if the
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 25 Nov 2009 11:12:38 +0000 (11:12 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 25 Nov 2009 11:12:38 +0000 (11:12 +0000)
user presses the delete key when the delete button is
disabled.

git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@8089 a7884b65-44f6-0310-8a51-81a127f17b15

CHANGELOG
pgadmin/frm/frmEditGrid.cpp

index 1794d8ab756ddacd0124cc1250666d001e0f9b16..3e273e89c7868ed8c8a6e1f6d9801995026b7a84 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -36,6 +36,9 @@ Changes
 
 Date       Dev Ver     Change details
 ---------- --- ------  --------------
+2009-11-25 DP  1.10.1  Don't attempt to remove rows in the edit grid if the
+                       user presses the delete key when the delete button is
+                       disabled.
 2009-11-23 GL  1.12.0  Support for "ALTER TABLE ... ALTER COLUMN ... SET
                        STATISTICS DISTINCT".
 2009-11-23 DP  1.10.1  Only offer valid server encodings for new databases
index 5709cab1c603f336be1173aab9c7e876f89f5159..ab632f567ee49b01038de3ab66d2833d4469b9b2 100644 (file)
@@ -1066,6 +1066,10 @@ void frmEditGrid::OnDelete(wxCommandEvent& event)
         return;
     }
 
+    // If the delete button is disabled, don't try to delete anything
+    if (!toolBar->GetToolEnabled(MNU_DELETE))
+        return;
+
     wxArrayInt delrows=sqlGrid->GetSelectedRows();
     int i=delrows.GetCount();