2007-09-10 Jonathan Pobst <monkey@jpobst.com>
authorJonathan Pobst <monkey@jpobst.com>
Mon, 10 Sep 2007 18:58:18 +0000 (18:58 -0000)
committerJonathan Pobst <monkey@jpobst.com>
Mon, 10 Sep 2007 18:58:18 +0000 (18:58 -0000)
* StatusStrip.cs: Change item placement to None if not visible.
* ToolStripItem.cs: Invalidate when InternalVisible changes.
These should have been committed to fix 82723, but I missed them.

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

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusStrip.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs

index 8bc19590db253906bd5b2426de6241df2ff13f9c..d7439400677cdba01094bac55df1a8e66b1b690e 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-10  Jonathan Pobst  <monkey@jpobst.com>
+
+       * StatusStrip.cs: Change item placement to None if not visible.
+       * ToolStripItem.cs: Invalidate when InternalVisible changes.
+       These should have been committed to fix 82723, but I missed them.
+
 2007-09-10  Jonathan Pobst  <monkey@jpobst.com>
 
        * ToolStrip.cs: Make sure ItemClicked is raised before the ToolStripItem's
index 32beb03cc27553b9ef904bc9980654536315cd5e..6a76ca460fba19e5f146d81626897a9a25c6e3a3 100644 (file)
@@ -176,7 +176,7 @@ namespace System.Windows.Forms
                                overflow[i] = tsi.Overflow;
                                widths[i] = tsi.GetPreferredSize (proposedSize).Width + tsi.Margin.Horizontal;
                                placement[i] = tsi.Overflow == ToolStripItemOverflow.Always ? ToolStripItemPlacement.None : ToolStripItemPlacement.Main;
-                               placement[i] = tsi.Available ? placement[i] : ToolStripItemPlacement.None;
+                               placement[i] = tsi.Available && tsi.InternalVisible ? placement[i] : ToolStripItemPlacement.None;
                                total_width += placement[i] == ToolStripItemPlacement.Main ? widths[i] : 0;
                                if (tsi is ToolStripStatusLabel && (tsi as ToolStripStatusLabel).Spring)
                                        spring_count++;
index 2502068d99864294ea719ec236fb1351c224fa21..e113d38a4d4e8230ecb3eb91da2b4dac089811ee 100644 (file)
@@ -1811,9 +1811,9 @@ namespace System.Windows.Forms
                        }
                }
 
-               internal bool InternalVisible {
+               internal virtual bool InternalVisible {
                        get { return this.visible; }
-                       set { this.visible = value; }
+                       set { this.visible = value; Invalidate (); }
                }
                
                internal Point Location {