Author: rolf
Date: 2007-08-08 08:44:13 -0400 (Wed, 08 Aug 2007)
New Revision: 83663

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridEntry.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGrid.cs
Log:
* System.Windows.Forms/GridEntry.cs: Add a null check.
* System.Windows.Forms/PropertyGrid.cs: When checking for existing grid
  entries, ignore category entries. Fixes #82297.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-08-08 12:44:10 UTC (rev 83662)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-08-08 12:44:13 UTC (rev 83663)
@@ -1,3 +1,9 @@
+2007-08-08  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * GridEntry.cs: Add a null check.
+       * PropertyGrid.cs: When checking for existing grid entries, ignore 
category
+         entries. Fixes #82297.
+
 2007-08-07  Jonathan Pobst  <[EMAIL PROTECTED]>
 
        * OwnerDrawPropertyBag.cs: Make the serialization constructor protected

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridEntry.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridEntry.cs     
2007-08-08 12:44:10 UTC (rev 83662)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridEntry.cs     
2007-08-08 12:44:13 UTC (rev 83663)
@@ -135,7 +135,7 @@
                                 * someplace else, maybe when we're
                                 * initially populating the
                                 * PropertyGrid? */
-                               if (selected_objects == null || 
selected_objects.Length == 0)
+                               if (selected_objects == null || 
selected_objects.Length == 0 || property_descriptor == null)
                                        return null;
 
                                object v = 
property_descriptor.GetValue(selected_objects[0]);

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGrid.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGrid.cs  
2007-08-08 12:44:10 UTC (rev 83662)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGrid.cs  
2007-08-08 12:44:13 UTC (rev 83663)
@@ -1390,7 +1390,7 @@
                        foreach (PropertyDescriptor property in properties) {
                                GridEntry grid_entry;
                                grid_entry = grid_item_coll [property.Name] as 
GridEntry;
-                               if (grid_entry == null) {
+                               if (grid_entry == null/* || grid_entry is 
CategoryGridEntry*/) {
                                        grid_entry = new GridEntry 
(property_grid_view, objs, property);
                                } else {
                                        grid_entry.SelectedObjects = objs;

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

Reply via email to