Author: toshok
Date: 2007-01-04 02:08:11 -0500 (Thu, 04 Jan 2007)
New Revision: 70455

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs
Log:
        * DataGrid.cs: the Alt+0 handling was wrong, it should have been
        Ctrl+0.  Fixes bug #80367.  Also, don't eat the Delete keypress
        when we're editing, which fixes #80047.

2007-01-03  Chris Toshok  <[EMAIL PROTECTED]>



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-01-04 06:52:40 UTC (rev 70454)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-01-04 07:08:11 UTC (rev 70455)
@@ -1,5 +1,11 @@
 2007-01-03  Chris Toshok  <[EMAIL PROTECTED]>
 
+       * DataGrid.cs: the Alt+0 handling was wrong, it should have been
+       Ctrl+0.  Fixes bug #80367.  Also, don't eat the Delete keypress
+       when we're editing, which fixes #80047.
+
+2007-01-03  Chris Toshok  <[EMAIL PROTECTED]>
+
        * Form.cs: apply patch contributed by Dominik Seichter.  fixes
        #80404.
 

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs      
2007-01-04 06:52:40 UTC (rev 70454)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs      
2007-01-04 07:08:11 UTC (rev 70455)
@@ -1828,7 +1828,7 @@
                                return false;
 
                        bool ctrl_pressed = ((ke.Modifiers & Keys.Control) != 
0);
-                       bool alt_pressed = ((ke.Modifiers & Keys.Alt) != 0);
+                       //bool alt_pressed = ((ke.Modifiers & Keys.Alt) != 0);
                        bool shift_pressed = ((ke.Modifiers & Keys.Shift) != 0);
 
                        switch (ke.KeyCode) {
@@ -1841,7 +1841,7 @@
                                return true;
                                
                        case Keys.D0:
-                               if (alt_pressed) {
+                               if (ctrl_pressed) {
                                        if (is_editing)
                                                
CurrentTableStyle.GridColumnStyles[CurrentColumn].EnterNullValue ();
                                        return true;
@@ -1969,11 +1969,15 @@
                                return true;
 
                        case Keys.Delete:
-                               foreach (int row in selected_rows.Keys) {
-                                       ListManager.RemoveAt (row);             
                                
+                               if (is_editing)
+                                       return false;
+                               else if (selected_rows.Keys.Count > 0) {
+                                       foreach (int row in selected_rows.Keys) 
{
+                                               ListManager.RemoveAt (row);     
                                        
+                                       }
+                                       selected_rows.Clear ();
+                                       CalcAreasAndInvalidate ();
                                }
-                               selected_rows.Clear ();
-                               CalcAreasAndInvalidate ();
 
                                return true;
                        }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to