2009-01-19 Ivan N. Zlatev <contact@i-nz.net>
authorIvan Zlatev <ivan@ivanz.com>
Mon, 19 Jan 2009 15:13:24 +0000 (15:13 -0000)
committerIvan Zlatev <ivan@ivanz.com>
Mon, 19 Jan 2009 15:13:24 +0000 (15:13 -0000)
* MenuAPI.cs: Do not handle shortcuts if the menu item is disabled.
[Fixes bug #467285]

svn path=/trunk/mcs/; revision=123800

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs

index 9baf838d453af3840333a6e46ea82af6c4b7e144..52f18814af89b4c726cac86a2f2c56fdc4fad692 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-19  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * MenuAPI.cs: Do not handle shortcuts if the menu item is disabled.
+       [Fixes bug #467285]
+
 2009-01-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
        * MonthCalendar.cs: When handling the selection changes using the
index 63d73d05eb62022f3e346f6dee28709768430503..5f94a3a2eb6859e2d11e3ce529fd00afd4f0b959 100644 (file)
@@ -665,7 +665,7 @@ namespace System.Windows.Forms {
                bool ProcessShortcut (Keys keyData)
                {
                        MenuItem item = shortcuts [(int)keyData] as MenuItem;
-                       if (item == null)
+                       if (item == null || !item.Enabled)
                                return false;
 
                        if (active)