Author: jackson
Date: 2007-07-10 11:07:05 -0400 (Tue, 10 Jul 2007)
New Revision: 81718

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
Log:

        * TreeView.cs: Update full row select invalidation to match the
        newer DrawSelection... method.
        - Make sure to invalidate the entire width when selecting a new
        node, if we have full row selection enabled.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2007-07-10 15:03:31 UTC (rev 81717)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2007-07-10 15:07:05 UTC (rev 81718)
@@ -1537,7 +1537,7 @@
                        int middle = y + (ActualItemHeight / 2);
 
                        if (full_row_select) {
-                               Rectangle r = new Rectangle (1, y + 2, 
ViewportRectangle.Width - 2, ActualItemHeight);
+                               Rectangle r = new Rectangle (1, y, 
ViewportRectangle.Width - 2, ActualItemHeight);
                                DrawSelectionAndFocus (node, dc, r);
                        }
 
@@ -1917,6 +1917,11 @@
                                        invalid = Bloat 
(prev_highlighted_node.Bounds);
                                }
 
+                               if (full_row_select || draw_mode != 
TreeViewDrawMode.Normal) {
+                                       invalid.X = 0;
+                                       invalid.Width = ViewportRectangle.Width;
+                               }
+
                                Invalidate (invalid);
                        } else {
                                highlighted_node = focused_node;

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

Reply via email to