2008-11-10 Jonathan Pobst <monkey@jpobst.com>
authorJonathan Pobst <monkey@jpobst.com>
Mon, 10 Nov 2008 20:17:05 +0000 (20:17 -0000)
committerJonathan Pobst <monkey@jpobst.com>
Mon, 10 Nov 2008 20:17:05 +0000 (20:17 -0000)
* TextControl.cs: Add some order of operation to our math so
we don't end up with a negative height for our invalidate rect.
[Fixes bug #381889]

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

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

index 56d5ee9cff19dea3a38dd488c8e8f30a6d69130a..281ef4bfa7a863fb7ed4433ec73553a480c4f9f4 100644 (file)
@@ -1,3 +1,9 @@
+2008-11-10  Jonathan Pobst  <monkey@jpobst.com>
+
+       * TextControl.cs: Add some order of operation to our math so
+       we don't end up with a negative height for our invalidate rect.
+       [Fixes bug #381889]
+
 2008-11-10  Jonathan Pobst  <monkey@jpobst.com>
 
        * Control.cs: When our enabled changes, notify our implicit children
index b3ee44a08bfbef78233065f2edef6cc9e3eff621..5d3c25cb73be69681200f7c8602055916e958ef7 100644 (file)
@@ -944,7 +944,7 @@ namespace System.Windows.Forms {
                                                offset_x, 
                                                line.Y - viewport_y + offset_y, 
                                                viewport_width, 
-                                               owner.Height - line.Y - viewport_y));
+                                               owner.Height - (line.Y - viewport_y)));
                                } else {
                                        // The tag was above the visible area, draw everything
                                        owner.Invalidate();