Author: jpobst
Date: 2007-09-11 17:16:05 -0400 (Tue, 11 Sep 2007)
New Revision: 85664

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
Log:
2007-09-11  Jonathan Pobst  <[EMAIL PROTECTED]>

        * Control.cs: Update the anchoring distances even when layout is 
supspended.
        Patch provided by George fixes bug #82805.

2007-09-11  Jonathan Pobst  <[EMAIL PROTECTED]>

        * DefaultLayoutTest.cs: Add test for bug #82805.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-11 21:00:25 UTC (rev 85663)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-09-11 21:16:05 UTC (rev 85664)
@@ -1,5 +1,10 @@
 2007-09-11  Jonathan Pobst  <[EMAIL PROTECTED]>
 
+       * Control.cs: Update the anchoring distances even when layout is 
supspended.
+       Patch provided by George fixes bug #82805.
+
+2007-09-11  Jonathan Pobst  <[EMAIL PROTECTED]>
+
        * Control.cs: Provide a setter for ExplicitHeight.
        * TextBoxBase.cs: Now that we have the implementation for explicit 
heights,
        remove the hacks in here for requested_height.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-09-11 21:00:25 UTC (rev 85663)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-09-11 21:16:05 UTC (rev 85664)
@@ -3824,14 +3824,14 @@
                public void PerformLayout(Control affectedControl, string 
affectedProperty) {
                        LayoutEventArgs levent = new 
LayoutEventArgs(affectedControl, affectedProperty);
 
+                       foreach (Control c in Controls.GetAllControls ())
+                               if (c.recalculate_distances)
+                                       c.UpdateDistances ();
+
                        if (layout_suspended > 0) {
                                layout_pending = true;
                                return;
                        }
-
-                       foreach (Control c in Controls.GetAllControls ())
-                               if (c.recalculate_distances)
-                                       c.UpdateDistances ();
                                        
                        layout_pending = false;
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2007-09-11 21:00:25 UTC (rev 85663)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2007-09-11 21:16:05 UTC (rev 85664)
@@ -1,5 +1,9 @@
 2007-09-11  Jonathan Pobst  <[EMAIL PROTECTED]>
 
+       * DefaultLayoutTest.cs: Add test for bug #82805.
+
+2007-09-11  Jonathan Pobst  <[EMAIL PROTECTED]>
+
        * DefaultLayoutTest.cs: Mark Bug82762 as WM dependent.
 
 2007-09-11  Jonathan Pobst  <[EMAIL PROTECTED]>

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
        2007-09-11 21:00:25 UTC (rev 85663)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
        2007-09-11 21:16:05 UTC (rev 85664)
@@ -550,6 +550,23 @@
                        f.Dispose ();
                }
                
+               [Test]
+               public void Bug82805 ()
+               {
+                       Control c1 = new Control ();
+                       c1.Size = new Size (100, 100);
+                       Control c2 = new Control ();
+                       c2.Size = new Size (100, 100);
+
+                       c2.SuspendLayout ();
+                       c1.Anchor = AnchorStyles.Left | AnchorStyles.Right;
+                       c2.Controls.Add (c1);
+                       c2.Size = new Size (200, 200);
+                       c2.ResumeLayout ();
+
+                       Assert.AreEqual (200, c1.Width, "A1");
+               }
+               
                [Test]  // bug #81199
                public void NestedControls ()
                {

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

Reply via email to